Created
November 30, 2020 17:25
-
-
Save CyprienLecallier/a92fd3c592224a1c0fabe9f47d8a5e69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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