This example shows how you can deploy a Spring Boot app to an Azure App Service instance using Pulumi in a Jenkins Pipeline. The Spring Boot app is packaged into a container image that is conveniently built as part of the Pulumi app. The container image is pushed up to a private Azure Container Registry and then used as the source for an App Service instance.
$ cd infrastructure
$ pulumi stack init dev
You will be prompted to do this during deployment if you forget this step.
$ az login
$ npm install
Run pulumi up
to preview and deploy changes:
$ pulumi up
Previewing changes:
+ pulumi:pulumi:Stack jenkins-tutorial-dev create
+ docker:image:Image spring-boot-greeting-app create
+ azure:core:ResourceGroup jenkins-tutorial-group create
+ azure:containerservice:Registry myacr create
+ azure:appservice:Plan appservice-plan create
+ azure:appservice:AppService spring-boot-greeting-app create
+ pulumi:pulumi:Stack jenkins-tutorial-dev create
...
$ pulumi stack output appServiceEndpoint
https://azpulumi-as0ef47193.azurewebsites.net
$ curl "$(pulumi stack output appServiceEndpoint)/greeting"
{"id":1, "content": "Hello, World"}