Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CyprienLecallier/a92fd3c592224a1c0fabe9f47d8a5e69 to your computer and use it in GitHub Desktop.
Save CyprienLecallier/a92fd3c592224a1c0fabe9f47d8a5e69 to your computer and use it in GitHub Desktop.
- stage: Deploy_to_Prod
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
dependsOn: CI
jobs:
- deployment: Deployment
displayName: Deploy container in Prod
pool:
vmImage: ubuntu-latest
environment:
name: prod
strategy:
runOnce:
deploy:
steps:
- task: AzureWebAppContainer@1
displayName: "Azure App Service Container Deploy"
inputs:
azureSubscription: "service_connection_name"
appName: "app_service_name"
containers: acr01.azurecr.io/image_name:latest
deployToSlotOrASE: true
resourceGroupName: "MYRG"
slotName: "staging"
routeTraffic:
steps:
- task: AzureAppServiceManage@0
displayName: "Azure App Service Deploy - switch slots"
inputs:
azureSubscription: "service_connection_name"
ResourceGroupName: "MYRG"
WebAppName: "app_service_name"
SourceSlot: production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment