Skip to content

Commit

Permalink
feat: always run cypress after a deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
sprutton1 committed Jun 25, 2024
1 parent 608e8c7 commit c0396ce
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/crons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
# when do a deploy so they don't fail erroneously, but these
# cannot cancel deploys
concurrency:
group: e2e
group: e2e-tools
cancel-in-progress: false

jobs:
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/deploy-on-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ on:
branches:
- main

# We want to ensure that in-progress cron runs are canceled
# when do a deploy so they don't fail erroneously
concurrency:
group: e2e
cancel-in-progress: true

jobs:
deploy-tools-prod:
uses: ./.github/workflows/deploy-stack.yml
Expand All @@ -17,10 +11,3 @@ jobs:
service: all
version: stable
secrets: inherit

e2e-validation:
needs: deploy-tools-prod
uses: ./.github/workflows/e2e-validation.yml
with:
environment: tools
secrets: inherit
40 changes: 25 additions & 15 deletions .github/workflows/deploy-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ on:
inputs:
environment:
type: string
required: true
default: "tools"
service:
type: string
required: true
default: "all"
version:
type: string
required: true
default: "stable"
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -51,35 +48,48 @@ jobs:
environment: shared
secrets: inherit

deploy-service:
needs: invalidate-cache
if: ${{ inputs.service != 'all' }}
uses: ./.github/workflows/deploy-service.yml
set-init:
uses: ./.github/workflows/set-init-version.yml
with:
environment: ${{ inputs.environment }}
service: ${{ inputs.service }}
version: ${{ inputs.version }}
secrets: inherit

define-deployment-matrix:
runs-on: ubuntu-latest
outputs:
services: $
steps:
- id: services
run: |
if "${{ inputs.service }}" == 'all'; then
echo 'services=["pinga", "rebaser", "sdf", "veritech", "web"]' >> "$GITHUB_OUTPUT"
else
echo 'services=["${{ inputs.service }}"]' >> "$GITHUB_OUTPUT"
fi
deploy-services:
needs: invalidate-cache
if: ${{ inputs.service == 'all' }}
needs: ["invalidate-cache", "define-deployment-matrix"]
strategy:
fail-fast: false
matrix:
service: ["pinga", "rebaser", "sdf", "veritech", "web"]
service: ${{ fromJSON(needs.define-deployment-matrix.outputs.services) }}
uses: ./.github/workflows/deploy-service.yml
with:
environment: ${{ inputs.environment }}
service: ${{ matrix.service }}
version: ${{ inputs.version }}
secrets: inherit

set-init:
needs: invalidate-cache
uses: ./.github/workflows/set-init-version.yml
e2e-validation:
# We want to ensure that in-progress cron runs against tools-prod
# are canceled when we do a deploy so they don't fail erroneously
concurrency:
group: e2e-${{ inputs.environment }}
cancel-in-progress: true
needs: deploy-services
uses: ./.github/workflows/e2e-validation.yml
with:
environment: ${{ inputs.environment }}
service: ${{ inputs.service }}
version: ${{ inputs.version }}
secrets: inherit

0 comments on commit c0396ce

Please sign in to comment.