I want to deploy my Spring Boot (Java) app on Azure using Azure DevOps. However, I cant seem to get the release pipeline working.
I already created an Azure build pipeline with the following azure-pipelines.yml:
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
goals: 'package'
options: '-Dmaven.test.skip=true'
mavenOptions: '-Dmaven.test.skip=true'
publishJUnitResults: false
javaHomeOption: 'JDKVersion'
mavenVersionOption: 'Default'
mavenAuthenticateFeed: false
effectivePomSkip: false
sonarQubeRunAnalysis: false
The build is successful, so the next step is to create a Release pipeline. I selected the option 'Deploy a Java app to Azure App Service'. When I try to add the artifact, then I see the following:
As you can see, I get the message 'No version is available for or the latest version has no artifacts to publish. Please check the source pipeline.'. This tells me that the build pipeline did not create the artifact or that some other setting is configure incorrectly. My initial thought is that I need to add a step to azure-pipelines.yml that actually puts the artifact somewhere.
Does anyone know what is the solution?