Skip to content

Instantly share code, notes, and snippets.

@cashewshideout
Last active May 8, 2020 14:18
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 cashewshideout/43f906a924236a38eb56ee4f7863bb9b to your computer and use it in GitHub Desktop.
Save cashewshideout/43f906a924236a38eb56ee4f7863bb9b to your computer and use it in GitHub Desktop.
.... #Content removed for focus on specific section
stages:
...
- stage: 'Staging' #Stage name cannot have spaces
displayName: 'Staging' #Name displayed when viewing in Azure DevOps
dependsOn: ['Build_Stage'] #List of previous stages that must complete before this stage runs
jobs:
- deployment: Deploy_Staging #No spaces
displayName: Staging Deployment #Name displayed in UI
pool:
vmImage: $(AgentImage) #variable that was defined previously (not shown in this snippet)
environment: Staging
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: 'app'
- task: ExtractFiles@1
displayName: 'Extract files'
inputs:
archiveFilePatterns: "$(Pipeline.Workspace)/app/application.zip"
destinationFolder: "$(Pipeline.Workspace)/files"
- task: AzureRmWebAppDeployment@4
displayName: 'Azure App Service Deploy'
inputs:
ConnectionType: 'AzureRM' #This is the default Value
WebAppKind: 'webApp' #This is the default value
azureSubscription: 'PipelineApp Azure Connection' #Name of the Service Connection previously created
WebAppName: 'stg-MWKS-PipelineApp' #Name of the App Service to be deployed to
Package: '$(Pipeline.Workspace)/files/BasicCoreApp' #Application files to be deployed
enableCustomDeployment: true #These two properties override the default of having
DeploymentType: 'webDeploy' #the pipeline deciding for us what it thinks the best deployment option should be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment