Skip to content

Commit

Permalink
chore(ci): fix GH var weirdness (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Oct 31, 2024
1 parent 1945ed3 commit aa7718c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
-p ORACLE_DB_PASSWORD='${{ secrets.ORACLE_DB_PASSWORD }}'
-p POSTGRES_DB_PASSWORD='${{ secrets.POSTGRES_DB_PASSWORD }}'
-p FORESTCLIENTAPI_KEY='${{ secrets.FORESTCLIENTAPI_KEY }}'
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p ZONE=test

deploys-test:
Expand Down Expand Up @@ -63,7 +64,6 @@ jobs:
file: frontend/openshift.deploy.yml
overwrite: true
parameters:
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p FAM_ROUTE=test
- name: fluentbit
file: common/openshift.fluentbit.yml
Expand Down Expand Up @@ -105,6 +105,7 @@ jobs:
-p ORACLE_DB_PASSWORD='${{ secrets.ORACLE_DB_PASSWORD }}'
-p POSTGRES_DB_PASSWORD='${{ secrets.POSTGRES_DB_PASSWORD }}'
-p FORESTCLIENTAPI_KEY='${{ secrets.FORESTCLIENTAPI_KEY }}'
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p ZONE=prod

image-promotions:
Expand Down Expand Up @@ -150,7 +151,6 @@ jobs:
file: frontend/openshift.deploy.yml
overwrite: true
parameters:
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p FAM_ROUTE=prod
- name: fluentbit
file: common/openshift.fluentbit.yml
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ jobs:
-p ORACLE_DB_PASSWORD='${{ secrets.ORACLE_DB_PASSWORD }}'
-p POSTGRES_DB_PASSWORD='${{ secrets.POSTGRES_DB_PASSWORD }}'
-p FORESTCLIENTAPI_KEY='${{ secrets.FORESTCLIENTAPI_KEY }}'
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
triggers: ('common/' 'backend/' 'frontend/')

builds:
name: Builds
needs: [init]
if: "!github.event.pull_request.head.repo.fork"
runs-on: ubuntu-24.04
permissions:
packages: write
Expand All @@ -95,8 +94,7 @@ jobs:

deploys:
name: Deploys
if: "!github.event.pull_request.head.repo.fork"
needs: [builds]
needs: [builds, init]
runs-on: ubuntu-24.04
strategy:
matrix:
Expand All @@ -120,7 +118,6 @@ jobs:
- name: frontend
file: frontend/openshift.deploy.yml
parameters:
-p VITE_USER_POOLS_WEB_CLIENT_ID=${{ vars.VITE_USER_POOLS_WEB_CLIENT_ID }}
-p MIN_REPLICAS=1
-p MAX_REPLICAS=1
-p FAM_ROUTE="$(( ${{ github.event.number }} % 50 ))"
Expand Down
12 changes: 11 additions & 1 deletion common/openshift.init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ parameters:
- name: FORESTCLIENTAPI_KEY
description:
required: true
- name: VITE_USER_POOLS_WEB_CLIENT_ID
description: Cognito user pools web client ID
required: true
objects:
- apiVersion: v1
kind: Secret
Expand All @@ -60,7 +63,6 @@ objects:
oracle-password: ${ORACLE_DB_PASSWORD}
oracle-secret: ${ORACLEDB_SECRET}
forest-client-api-key: ${FORESTCLIENTAPI_KEY}

- apiVersion: v1
kind: Secret
metadata:
Expand All @@ -85,6 +87,14 @@ objects:
network.openshift.io/policy-group: ingress
policyTypes:
- Ingress
- apiVersion: v1
kind: Secret
metadata:
name: ${NAME}-${ZONE}-frontend
labels:
app: ${NAME}-${ZONE}
stringData:
vite-user-pools-web-client-id: ${VITE_USER_POOLS_WEB_CLIENT_ID}
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down
8 changes: 5 additions & 3 deletions frontend/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ parameters:
- name: LOG_LEVEL
description: Caddy logging level DEBUG, INFO, WARN, ERROR, PANIC, and FATAL (https://github.com/caddyserver/caddy/blob/master/logging.go)
value: "info"
- name: VITE_USER_POOLS_WEB_CLIENT_ID
- name: VITE_ZONE
value: DEV
- name: RANDOM_EXPRESSION
Expand Down Expand Up @@ -83,12 +82,15 @@ objects:
value: "${LOG_LEVEL}"
- name: VITE_BACKEND_URL
value: "https://${NAME}-${ZONE}-backend.${DOMAIN}"
- name: VITE_USER_POOLS_WEB_CLIENT_ID
value: "${VITE_USER_POOLS_WEB_CLIENT_ID}"
- name: VITE_ZONE
value: "${ZONE}"
- name: RANDOM_EXPRESSION
value: ${RANDOM_EXPRESSION}
- name: VITE_USER_POOLS_WEB_CLIENT_ID
valueFrom:
secretKeyRef:
name: ${NAME}-${ZONE}-frontend
key: vite-user-pools-web-client-id
ports:
- containerPort: 3000
protocol: TCP
Expand Down

0 comments on commit aa7718c

Please sign in to comment.