update production slot name to 'staging' (#25131)
This commit is contained in:
16
.github/workflows/prod-build-deploy-azure.yml
vendored
16
.github/workflows/prod-build-deploy-azure.yml
vendored
@@ -90,12 +90,12 @@ jobs:
|
||||
run: |
|
||||
sed 's|#{IMAGE}#|${{ env.DOCKER_IMAGE }}|g' docker-compose.prod.tmpl.yaml > docker-compose.prod.yaml
|
||||
|
||||
- name: 'Apply updated docker-compose.prod.yaml config to preview slot'
|
||||
- name: 'Apply updated docker-compose.prod.yaml config to staging slot'
|
||||
run: |
|
||||
az webapp config container set --multicontainer-config-type COMPOSE --multicontainer-config-file docker-compose.prod.yaml --slot preview -n ghdocs-prod -g docs-prod
|
||||
az webapp config container set --multicontainer-config-type COMPOSE --multicontainer-config-file docker-compose.prod.yaml --slot staging -n ghdocs-prod -g docs-prod
|
||||
|
||||
# Watch preview slot instances to see when all the instances are ready
|
||||
- name: Check that preview slot is ready
|
||||
# Watch staging slot instances to see when all the instances are ready
|
||||
- name: Check that staging slot is ready
|
||||
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
|
||||
env:
|
||||
CHECK_INTERVAL: 10000
|
||||
@@ -115,7 +115,7 @@ jobs:
|
||||
let hasStopped = false
|
||||
const waitDuration = parseInt(process.env.CHECK_INTERVAL, 10) || 10000
|
||||
async function doCheck() {
|
||||
const states = getStatesForSlot('preview')
|
||||
const states = getStatesForSlot('staging')
|
||||
console.log(`Instance states:`, states)
|
||||
|
||||
// We must wait until at-least 1 instance has STOPPED to know we're looking at the "next" deployment and not the "previous" one
|
||||
@@ -136,10 +136,10 @@ jobs:
|
||||
|
||||
doCheck()
|
||||
|
||||
# TODO - make a request to verify the preview app version aligns with *this* github action workflow commit sha
|
||||
- name: 'Swap preview slot to production'
|
||||
# TODO - make a request to verify the staging app version aligns with *this* github action workflow commit sha
|
||||
- name: 'Swap staging slot to production'
|
||||
run: |
|
||||
az webapp deployment slot swap --slot preview --target-slot production -n ghdocs-prod -g docs-prod
|
||||
az webapp deployment slot swap --slot staging --target-slot production -n ghdocs-prod -g docs-prod
|
||||
|
||||
- name: Purge Fastly edge cache
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user