Skip to content

Commit

Permalink
chore(ci): image registry consistency (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Jan 18, 2024
1 parent a10529d commit 86f28e9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
workflow_dispatch:

env:
REGISTRY: ghcr.io
NAME: fom

concurrency:
Expand All @@ -19,7 +18,7 @@ concurrency:

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

deploy-test:
name: TEST Deploys
needs: [codeql]
environment: test
env:
ZONE: test
Expand All @@ -58,6 +56,7 @@ jobs:
file: api/openshift.deploy.yml
overwrite: true
parameters:
-p OC_NAMESPACE=${{ vars.OC_NAMESPACE }}
-p URL=fom-test.nrs.gov.bc.ca
-p [email protected]
-p DB_TESTDATA=true
Expand Down Expand Up @@ -87,7 +86,7 @@ jobs:
overwrite: ${{ matrix.overwrite }}
penetration_test: false
parameters:
-p PROMOTE=ghcr.io/${{ github.repository }}/${{ matrix.name }}:${{ env.ZONE }}
-p PROMOTE=${{ github.repository }}/${{ matrix.name }}:${{ env.ZONE }}
-p ZONE=${{ env.ZONE }} ${{ matrix.parameters }}

certbot-test:
Expand All @@ -109,7 +108,7 @@ jobs:
deploy-prod:
name: PROD Deploys
needs: [codeql, deploy-test]
needs: [deploy-test]
environment: prod
env:
ZONE: prod
Expand All @@ -122,7 +121,8 @@ jobs:
- name: api
file: api/openshift.deploy.yml
overwrite: true
parameters:
parameters:
-p OC_NAMESPACE=${{ vars.OC_NAMESPACE }}
-p URL=fom.nrs.gov.bc.ca
-p AWS_USER_POOLS_WEB_CLIENT_ID="4bu2n8at3m32a2fqnvd4t06la1"
-p LOGOUT_CHAIN_URL="https://logon7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/logout?redirect_uri="
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
overwrite: ${{ matrix.overwrite }}
penetration_test: false
parameters:
-p PROMOTE=ghcr.io/${{ github.repository }}/${{ matrix.name }}:test
-p PROMOTE=${{ github.repository }}/${{ matrix.name }}:test
-p ZONE=${{ env.ZONE }} ${{ matrix.parameters }}

certbot-prod:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ jobs:
file: api/openshift.deploy.yml
overwrite: true
parameters:
-p OC_NAMESPACE=${{ vars.OC_NAMESPACE }}
-p CERTBOT=false -p REPLICA_COUNT=1
-p [email protected]
-p DB_TESTDATA=true
Expand Down Expand Up @@ -143,7 +144,7 @@ jobs:
overwrite: ${{ matrix.overwrite }}
penetration_test: false
parameters:
-p PROMOTE=ghcr.io/${{ github.repository }}/${{ matrix.name }}:${{ env.ZONE }}
-p PROMOTE=${{ github.repository }}/${{ matrix.name }}:${{ env.ZONE }}
-p URL=fom-${{ env.ZONE }}.apps.silver.devops.gov.bc.ca
-p ZONE=${{ env.ZONE }} ${{ matrix.parameters }}
triggers: ${{ matrix.triggers }}
7 changes: 5 additions & 2 deletions api/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ parameters:
- name: BATCH_CLIENT_RFSH_API_TKN_OP_SECRET_NAME
description: OP secrete name for CLIENT API Token.
value: "fom-client-app-api"
- name: OC_NAMESPACE
description: OpenShift namespace containing imported images
required: true
objects:
- apiVersion: v1
kind: ImageStream
Expand Down Expand Up @@ -320,7 +323,7 @@ objects:
containers:
- name: ${NAME}-batch
# Full image name required due to bug https://bugzilla.redhat.com/show_bug.cgi?id=2000216
image: ${REGISTRY}/${PROMOTE}
image: image-registry.apps.silver.devops.gov.bc.ca/${OC_NAMESPACE}/${NAME}-${ZONE}-${COMPONENT}:${ZONE}-api
imagePullPolicy: Always
args: ["-batchWorkflowStateChange"]
env:
Expand Down Expand Up @@ -383,7 +386,7 @@ objects:
containers:
- name: ${NAME}-batch
# Full image name required due to bug https://bugzilla.redhat.com/show_bug.cgi?id=2000216
image: ${REGISTRY}/${PROMOTE}
image: image-registry.apps.silver.devops.gov.bc.ca/${OC_NAMESPACE}/${NAME}-${ZONE}-${COMPONENT}:${ZONE}-api
imagePullPolicy: Always
args: ["-batchForestClientDataRefresh"]
env:
Expand Down

0 comments on commit 86f28e9

Please sign in to comment.