Deploying a java functions app from the console works fine with the command:
./mvnw azure-functions:deploy
But while trying to deploy from Azure devops, the functions wont work.
The functions appear on the Functions portal.
The status for every function is "Enabled"
The settings are the same as before.
So everything seems in order, but when I try to evoke a functions. the response is 500 internal server error.
the yaml to buld the artifact
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- task: JavaToolInstaller@0
displayName: 'JavaToolInstaller Java version 17 '
inputs:
versionSpec: '17'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- task: Maven@3
displayName: 'Maven Build and Package'
inputs:
mavenPomFile: 'pom.xml'
goals: 'clean package'
options: '-DskipTests' # Optional, to skip tests
- task: Maven@3
displayName: 'Azure Functions Package'
inputs:
mavenPomFile: 'pom.xml'
goals: 'azure-functions:package'
options: ''
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**/azure-functions/**'
TargetFolder: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()
- task: ArchiveFiles@2
displayName: 'Archive $(Build.ArtifactStagingDirectory)/target/azure-functions/f-app-v2'
inputs:
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/target/azure-functions/f-app-v2'
includeRootFolder: false
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()