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

fix: missing prod label for cronjob (among others?) #564

Closed
wants to merge 10 commits into from
41 changes: 20 additions & 21 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

jobs:
codeql:
name: Semantic Code Analysis
name: CodeQL Analysis
runs-on: ubuntu-22.04
permissions:
actions: read
Expand All @@ -44,7 +44,6 @@ jobs:

deploy-test:
name: TEST Deploys
needs: [codeql]
environment: test
env:
ZONE: test
Expand Down Expand Up @@ -91,7 +90,7 @@ jobs:
-p ZONE=${{ env.ZONE }} ${{ matrix.parameters }}

certbot-test:
name: Certbot
name: TEST Certbot
needs: [deploy-test]
environment: test
runs-on: ubuntu-22.04
Expand All @@ -107,9 +106,24 @@ jobs:
# Run certbot with one-off job
oc create job "certbot-manual-$(date +%s)" --from=cronjob/certbot

image-promotions:
name: PROD Promotions
needs: [deploy-test]
DerekRoberts marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-22.04
strategy:
matrix:
component: [api, admin, db, public]
steps:
- uses: shrink/actions-docker-registry-tag@v3
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.component }}
target: test
tags: prod

deploy-prod:
name: PROD Deploys
needs: [codeql, deploy-test]
needs: [image-promotions]
environment: prod
env:
ZONE: prod
Expand Down Expand Up @@ -150,11 +164,11 @@ jobs:
overwrite: ${{ matrix.overwrite }}
penetration_test: false
parameters:
-p PROMOTE=ghcr.io/${{ github.repository }}/${{ matrix.name }}:test
-p PROMOTE=ghcr.io/${{ github.repository }}/${{ matrix.name }}:prod
-p ZONE=${{ env.ZONE }} ${{ matrix.parameters }}

certbot-prod:
name: Certbot
name: PROD Certbot
needs: [deploy-prod]
environment: prod
runs-on: ubuntu-22.04
Expand All @@ -169,18 +183,3 @@ jobs:

# Run certbot with one-off job
oc create job "certbot-manual-$(date +%s)" --from=cronjob/certbot

image-promotions:
name: Promote images to PROD
needs: [deploy-prod]
runs-on: ubuntu-22.04
strategy:
matrix:
component: [api, admin, db, public]
steps:
- uses: shrink/actions-docker-registry-tag@v3
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.component }}
target: test
tags: prod