Merge pull request #4 from james-flynn-ie/improve-comments

Added: Pipeline YAML Comments to improve readability
This commit is contained in:
James Flynn 2021-03-03 20:10:08 +00:00 committed by GitHub
commit d19f1ad476
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,7 +66,7 @@ stages:
mavenAuthenticateFeed: false mavenAuthenticateFeed: false
effectivePomSkip: false effectivePomSkip: false
sonarQubeRunAnalysis: true sonarQubeRunAnalysis: true
sqMavenPluginVersionChoice: 'latest' sqMavenPluginVersionChoice: 'latest' # Select latest SonarQube plugin for Maven. Relies on POM dependency version, if not set.
# Adds results and link to sonarcloud.io reports under 'Extensions' tab on pipeline run report. # Adds results and link to sonarcloud.io reports under 'Extensions' tab on pipeline run report.
# see: https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud # see: https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud
@ -98,11 +98,13 @@ stages:
- stage: CDeployment - stage: CDeployment
displayName: 'Continuous Deployment' displayName: 'Continuous Deployment'
dependsOn: [CI_CDelivery] dependsOn: [CI_CDelivery]
# Only deploy web app to production env using main branch. This stage will be skipped for all other branches.
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs: jobs:
- job: DeployWebApp - job: DeployWebApp
displayName: Deploy spring-petclinic Java Web App displayName: Deploy spring-petclinic Java Web App
steps: steps:
# Need to download JAR built in CI-CDelivery stage first, as artifacts are not passed between stages.
- task: DownloadPipelineArtifact@2 - task: DownloadPipelineArtifact@2
inputs: inputs:
artifact: 'jar-artifact' artifact: 'jar-artifact'
@ -110,17 +112,18 @@ stages:
# Deploy JAR into Azure Web App Service https://docs.microsoft.com/en-us/azure/app-service/overview # Deploy JAR into Azure Web App Service https://docs.microsoft.com/en-us/azure/app-service/overview
# Azure App Service offers a Web application hosting Platform-as-a-Service, offering: # Azure App Service offers a Web application hosting Platform-as-a-Service, offering:
# - Hosting
# - Public URL
# - High Availability and autoscaling (based on policies)
# - Security # - Security
# - Load balancing # - Load balancing
# - High Availability and autoscaling (based on policies) # See: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-rm-web-app?view=azure-devops
# For pipeline configuration, see: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-rm-web-app?view=azure-devops
- task: AzureWebApp@1 - task: AzureWebApp@1
displayName: Deploy spring-petclinic to Azure Web App service displayName: Deploy spring-petclinic to Azure Web App service
inputs: inputs:
# For configuring Service Connection, see: https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml # For configuring a Service Connection, see: https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml
azureSubscription: 'azure-svc-connection' azureSubscription: 'azure-svc-connection'
appType: webAppLinux appType: webAppLinux
appName: 'james-pet-clinic' appName: 'james-pet-clinic'
package: '$(System.DefaultWorkingDirectory)/**/*.jar' package: '$(System.DefaultWorkingDirectory)/**/*.jar'
# Only deploy web app from main branch (for release purposes)
... ...