From f5fe8455895b7208594fa7459a0841b1029db869 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Fri, 3 May 2024 16:17:01 -0400 Subject: [PATCH] chore(ci): vars (#184) --- .github/workflows/pr-open.yml | 2 ++ backend/openshift.deploy.yml | 20 ++++++++++++++++++++ docker-compose.yml | 10 +++++++--- frontend/openshift.deploy.yml | 2 ++ 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index a327c37..23b547d 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -66,6 +66,8 @@ jobs: -p PROMOTE=${{ github.repository }}/${{ matrix.name }}:${{ github.event.number }} -p VITE_QUESTIONS_API_KEY=${{ secrets.VITE_QUESTIONS_API_KEY }} -p MIN_REPLICAS=1 -p MAX_REPLICAS=2 ${{ matrix.parameters }} + -p S3_BUCKETNAME=${{ secrets.S3_BUCKETNAME }} + -p S3_SECRETKEY=${{ secrets.S3_SECRETKEY }} triggers: ${{ matrix.triggers }} verification_path: ${{ matrix.verification_path }} diff --git a/backend/openshift.deploy.yml b/backend/openshift.deploy.yml index c106c59..8ad4535 100644 --- a/backend/openshift.deploy.yml +++ b/backend/openshift.deploy.yml @@ -54,6 +54,18 @@ parameters: value: "9c82d5fc-1d34-4a0c-97f2-c0c756791c34" - name: VITE_QUESTIONS_API_KEY description: Dummy param to satisfy workflow + - name: S3_ACCESSKEY + description: Access key for S3 + value: nr-fsa-tst + - name: S3_ENDPOINT + description: Endpoint for S3 + value: nrs.objectstore.gov.bc.ca + - name: S3_BUCKETNAME + description: Bucket name for S3 + value: tivpth + - name: S3_SECRETKEY + description: Secret key for S3 + required: true objects: - apiVersion: networking.k8s.io/v1 kind: NetworkPolicy @@ -138,6 +150,14 @@ objects: value: ${CHES_CLIENT_SECRET} - name: CHES_TOKEN_URL value: ${CHES_TOKEN_URL} + - name: S3_ACCESSKEY + value: ${S3_ACCESSKEY} + - name: S3_BUCKETNAME + value: ${S3_BUCKETNAME} + - name: S3_ENDPOINT + value: ${S3_ENDPOINT} + - name: S3_SECRETKEY + value: ${S3_SECRETKEY} ports: - containerPort: 5000 protocol: TCP diff --git a/docker-compose.yml b/docker-compose.yml index e8bbf08..2c4638a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ x-common: &common depends_on: ["backend"] environment: VITE_BACKEND_URL: http://backend:5000 - VITE_ZONE: DEV + VITE_ZONE: PROD healthcheck: test: wget --no-verbose --spider http://localhost:3000 interval: 15s @@ -18,8 +18,12 @@ services: container_name: backend entrypoint: sh -c "npm ci && npm run start" environment: - CHES_CLIENT_ID : 09C5071A-ACE9B6FACF6 - CHES_TOKEN_URL : https://test.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token + CHES_CLIENT_ID: 09C5071A-ACE9B6FACF6 + CHES_TOKEN_URL: https://test.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token + S3_ACCESSKEY: nr-fsa-tst + S3_BUCKETNAME: tivpth + S3_ENDPOINT: nrs.objectstore.gov.bc.ca + S3_SECRETKEY: ${S3_SECRETKEY} healthcheck: test: timeout 10s bash -c 'true > /dev/tcp/127.0.0.1/5000' interval: 15s diff --git a/frontend/openshift.deploy.yml b/frontend/openshift.deploy.yml index 40847ab..b6d7e80 100644 --- a/frontend/openshift.deploy.yml +++ b/frontend/openshift.deploy.yml @@ -42,6 +42,8 @@ parameters: - name: VITE_QUESTIONS_API_KEY - name: VITE_ZONE value: DEV + - name: S3_SECRETKEY + description: Dummy param to satisfy workflow objects: - apiVersion: v1 kind: ImageStream