Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: always run cypress after a deploy #4038

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.services.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
Loading