Skip to content

Commit

Permalink
Load vars into merge workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Sep 23, 2023
1 parent 19f00ec commit 633e7f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- name: frontend
file: frontend/openshift.deploy.yml
overwrite: true
parameters:
-p VITE_USER_POOLS_ID=${{ vars.VITE_USER_POOLS_ID }}
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
steps:
- uses: bcgov-nr/[email protected]
with:
Expand All @@ -37,8 +40,9 @@ jobs:
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: ${{ matrix.overwrite }}
parameters:
-p ZONE=test -p PROMOTE=${{ github.repository }}/${{ matrix.name }}:test
-p NAME=${{ github.event.repository.name }} ${{ matrix.parameters }}
-p ZONE=test -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/${{ matrix.name }}:test
${{ matrix.parameters }}
verification_path: ${{ matrix.verification_path }}

deploys-prod:
Expand All @@ -57,6 +61,10 @@ jobs:
- name: frontend
file: frontend/openshift.deploy.yml
overwrite: true
parameters:
-p VITE_USER_POOLS_ID=${{ vars.VITE_USER_POOLS_ID }}
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p VITE_REDIRECT_SIGN_OUT="${{ vars.VITE_REDIRECT_SIGN_OUT }}"
steps:
- uses: bcgov-nr/[email protected]
with:
Expand All @@ -66,8 +74,9 @@ jobs:
oc_token: ${{ secrets.OC_TOKEN }}
overwrite: ${{ matrix.overwrite }}
parameters:
-p ZONE=prod -p PROMOTE=${{ github.repository }}/${{ matrix.name }}:test
-p NAME=${{ github.event.repository.name }} ${{ matrix.parameters }}
-p ZONE=prod -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/${{ matrix.name }}:test
${{ matrix.parameters }}
verification_path: ${{ matrix.verification_path }}

image-promotions:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,14 @@ jobs:
- name: backend
file: backend/openshift.deploy.yml
overwrite: true
parameters: -p MIN_REPLICAS=1 -p MAX_REPLICAS=2
triggers: ('backend/' 'frontend/')
verification_path: /health
- name: frontend
file: frontend/openshift.deploy.yml
overwrite: true
parameters:
-p ZONE=${{ github.event.number }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/frontend:${{ github.event.number }}
-p VITE_USER_POOLS_ID=${{ vars.VITE_USER_POOLS_ID }}
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p MIN_REPLICAS=1 -p MAX_REPLICAS=2
triggers: ('backend/' 'frontend/')
steps:
- uses: bcgov-nr/[email protected]
Expand All @@ -104,6 +100,6 @@ jobs:
parameters:
-p ZONE=${{ github.event.number }} -p NAME=${{ github.event.repository.name }}
-p PROMOTE=${{ github.repository }}/${{ matrix.name }}:${{ github.event.number }}
${{ matrix.parameters }}
-p MIN_REPLICAS=1 -p MAX_REPLICAS=2 ${{ matrix.parameters }}
triggers: ${{ matrix.triggers }}
verification_path: ${{ matrix.verification_path }}

0 comments on commit 633e7f1

Please sign in to comment.