Skip to content

Instantly share code, notes, and snippets.

@joewashington75
Created July 5, 2020 18:59
Show Gist options
  • Save joewashington75/66fe53c1ea4b59fc707a7a2cc21fbfd1 to your computer and use it in GitHub Desktop.
Save joewashington75/66fe53c1ea4b59fc707a7a2cc21fbfd1 to your computer and use it in GitHub Desktop.
- stage: DeployToDev
displayName: Deploy to Dev
dependsOn: Build
jobs:
- deployment: DeployARMAndWebApp
displayName: Deploy infrastructure and web app
environment: 'dev'
variables:
- group: VariableGroup-dev
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'
azureResourceManagerConnection: 'MultiStagePipeline-dev'
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'
azureSubscription: 'MultiStagePipeline-dev'
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