Search code examples
spring-bootazure-devopsazure-app-service-envrmnt

Spring boot executable jar deploy to Azure App Service via Azure devops


I have build a build and release pipeline in Azure devops that runs the package goal against my spring boot application. It is a standalone app.

The build generates the jar file and publishes it as an artifact. So far so good.

I have then created a release pipeline and done all the configurations for selecting my resource group, subscription, type of app, that the runtime is jre8 and then pointed to the published artefact.

The release works as well and I can see in the wwwroot folder that the jar is there.

However in the log stream of the app in the portal the application hasn't really started. It just seems that the release copied the jar file but then didn't start the actual app.

If I run the maven webapp:deploy command from Intellij then it deploys to my resource group and the spring boot app starts.

What is the difference here? Surely the azure app service deploy task should also start the jar file or?


Solution

  • Fixed it after going through the pom configuration found here and also upgraded to the latest plugin: https://github.com/microsoft/azure-maven-plugins/blob/develop/docs/web-app-samples.md#Web-App-on-Linux-with-Java-8-and-JAR-deployment