Skip to content

Instantly share code, notes, and snippets.

@joewashington75
Created July 5, 2020 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joewashington75/e31900922078182b383befb87dc682bc to your computer and use it in GitHub Desktop.
Save joewashington75/e31900922078182b383befb87dc682bc to your computer and use it in GitHub Desktop.
# Name changed from DeployToDev
- stage: DeployToQA
# Changed from Deploy to Dev
displayName: Deploy to QA
# Added to ensure this stage will not deploy until Dev has completed
dependsOn: DeployToDev
jobs:
- deployment: DeployARMAndWebApp
displayName: Deploy infrastructure and web app
# Changed Point to the qa environment
environment: 'qa'
variables:
# Changed to use the QA variables
- group: VariableGroup-qa
strategy:
runOnce:
preDeploy:
steps:
- download: current
artifact: angular-app
displayName: Download Angular artifact
- download: current
artifact: arm-template
displayName: Download ARM template artifact
deploy:
steps:
- task: AzureResourceManagerTemplateDeployment@3
displayName: Deploy ARM Template
inputs:
deploymentScope: 'Resource Group'
# Changed to use the QA environment service connection
azureResourceManagerConnection: 'MultiStagePipeline-qa'
subscriptionId: '38c15d6f-362a-4c30-9cd2-f1b3d8e1c38e'
action: 'Create Or Update Resource Group'
resourceGroupName: 'rg-multistage-pipeline-$(environment)'
location: 'UK South'
templateLocation: 'Linked artifact'
csmFile: '$(Pipeline.Workspace)/arm-template/WebSite.json'
overrideParameters: '-environment $(environment)'
deploymentMode: 'Incremental'
- task: AzureRmWebAppDeployment@4
displayName: Deploy Angular App
inputs:
ConnectionType: 'AzureRM'
# Changed to use the QA environment serivce connectio
azureSubscription: 'MultiStagePipeline-qa'
appType: 'webApp'
WebAppName: 'app-multistagepipeline-$(environment)'
packageForLinux: '$(Pipeline.Workspace)/angular-app/multistage-pipeline-demo.zip'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment