Merge pull request #2 from james-flynn-ie/deploy-azure-web-app

Added: Deploy Web App job
This commit is contained in:
James Flynn 2021-03-01 20:20:30 +00:00 committed by GitHub
commit 9bdbc761ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,8 +13,8 @@ pool:
name: $(Build.DefinitionName).$(SourceBranchName).$(Date:yyyyMMdd)$(Rev:.r)
jobs:
- job: BuildTest
displayName: Build and Test Maven Project
- job: BuildTestDeploy
displayName: Build Test and Deploy spring-petclinic Java Web App
steps:
- task: Maven@3
displayName: 'Maven Package'
@ -46,3 +46,14 @@ jobs:
publishLocation: 'Container' # Publishes inside Azure Pipelines artifact folder.
parallel: true # Increased speed through multi-threaded copying.
parallelCount: 8 # Dependent upon CPU capabilities.
- task: AzureWebApp@1
displayName: Deploy spring-petclinic to Azure Web App service
inputs:
azureSubscription: 'azure-svc-connection'
appType: webAppLinux
appName: 'james-pet-clinic'
package: '$(System.DefaultWorkingDirectory)/**/*.jar'
# Only deploy web app from main branch (for release purposes)
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))