Skip to content

Instantly share code, notes, and snippets.

@cashewshideout
Last active May 3, 2023 13:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cashewshideout/9bfddb79012fa10ecb1495d797d8e005 to your computer and use it in GitHub Desktop.
Save cashewshideout/9bfddb79012fa10ecb1495d797d8e005 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
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:
- task: ExtractFiles@1
displayName: 'Extract files'
inputs:
archiveFilePatterns: ''
destinationFolder: ''
- 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: '' #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