Skip to content

Commit

Permalink
Merge pull request #4856 from systeminit/fix/deploy-before-wait
Browse files Browse the repository at this point in the history
fix: amend deployment of prod
  • Loading branch information
johnrwatson authored Oct 23, 2024
2 parents 9b6e25c + 398cbff commit cf4918d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 59 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/deploy-after-wait.yml

This file was deleted.

22 changes: 21 additions & 1 deletion .github/workflows/deploy-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
version:
type: string
default: "stable"
wait_duration:
type: number
default: 0

workflow_dispatch:
inputs:
Expand All @@ -27,6 +30,11 @@ on:
required: true
description: "version to deploy"
default: "stable"
wait_duration:
type: number
required: false
description: "How long to wait before deploying"
default: 0

# We only one one deploy happening at a time per environment, so if one is
# in progress, we'll wait for it to finish before starting the
Expand All @@ -37,6 +45,16 @@ concurrency:
cancel-in-progress: false

jobs:

wait:
name: wait
runs-on: ubuntu-latest
steps:
- name: wait
run: |
echo "Sleeping for ${{ inputs.wait_duration }}"
sleep ${{ inputs.wait_duration }}
invoke-and-check-cdn:
uses: ./.github/workflows/invoke-and-check-invalidations.yml
with:
Expand All @@ -45,6 +63,8 @@ jobs:

set-service-versions:
uses: ./.github/workflows/set-service-version.yml
needs:
- invoke-and-check-cdn
strategy:
fail-fast: false
matrix:
Expand All @@ -57,8 +77,8 @@ jobs:

set-maintenance-mode:
needs:
- invoke-and-check-cdn
- set-service-versions
- wait
uses: ./.github/workflows/set-maintenance-mode.yml
with:
environment: ${{ inputs.environment }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-deploy-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:

jobs:
deploy-production:
uses: ./.github/workflows/deploy-after-wait.yml
uses: ./.github/workflows/deploy-stack.yml
with:
environment: production
wait_duration: 900
Expand Down

0 comments on commit cf4918d

Please sign in to comment.