Skip to content

Commit

Permalink
fix(ci): promote images to prod (#292)
Browse files Browse the repository at this point in the history
* fix(ci): promote images to prod

* Removed one more PROMOTE var
  • Loading branch information
DerekRoberts authored Oct 3, 2024
1 parent 44a71d8 commit 543da3c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .github/openshift/deploy.backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ parameters:
- name: ORG
description: Organization name
value: bcgov
- name: PROMOTE
description: Image (namespace/name:tag) to promote/import
value: bcgov/nr-old-growth:prod-backend
- name: CHES_CLIENT_ID
description: CHES service client id
required: true
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
#TODO: check sonar for OG
tests-backend:
name: Backend Unit Tests
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-24.04
continue-on-error: true
steps:
Expand Down Expand Up @@ -109,7 +108,6 @@ jobs:
overwrite: true
parameters:
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/backend:${{ env.ZONE }}
-p CHES_CLIENT_ID=${{ secrets.CHES_CLIENT_ID }}
-p CHES_CLIENT_SECRET=${{ secrets.CHES_CLIENT_SECRET }}
-p CHES_TOKEN_URL='https://test.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token'
Expand All @@ -118,12 +116,24 @@ jobs:
-p BCEID_FORM_PASSWORD=${{ secrets.CHEFS_BCEID_FORM_PASSWORD}}
-p IDIR_FORM_PASSWORD=${{ secrets.CHEFS_IDIR_FORM_PASSWORD}}

prod-promotions:
name: Promote Images to Prod
needs:
- deploy-test-backend
runs-on: ubuntu-24.04
steps:
- uses: shrink/actions-docker-registry-tag@v4
with:
registry: ghcr.io
repository: ${{ github.repository }}/backend
target: test
tags: prod

deploy-prod-database:
name: Deploy Database on Prod Env
needs:
- deploy-test-backend
- prod-promotions
env:
PREV: test
ZONE: prod
environment: prod
runs-on: ubuntu-24.04
Expand All @@ -145,7 +155,6 @@ jobs:
needs:
- deploy-prod-database
env:
PREV: test
ZONE: prod
environment: prod
runs-on: ubuntu-24.04
Expand All @@ -162,7 +171,6 @@ jobs:
overwrite: true
parameters:
-p ZONE=${{ env.ZONE }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/backend:${{ env.PREV }}
-p CHES_CLIENT_ID=${{ secrets.CHES_CLIENT_ID }}
-p CHES_CLIENT_SECRET=${{ secrets.CHES_CLIENT_SECRET }}
-p CHES_TOKEN_URL='https://loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ jobs:
overwrite: true
parameters:
-p ZONE=${{ github.event.number }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/backend:${{ github.event.number }}
-p CHES_CLIENT_ID=${{ secrets.CHES_CLIENT_ID }}
-p CHES_CLIENT_SECRET=${{ secrets.CHES_CLIENT_SECRET }}
-p CHES_TOKEN_URL='https://dev.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token'
Expand Down

0 comments on commit 543da3c

Please sign in to comment.