From 1621cc16303bcbf9f599353dcadb41944109264c Mon Sep 17 00:00:00 2001 From: sakthi-aot <81777282+sakthi-aot@users.noreply.github.com> Date: Thu, 25 Apr 2024 10:11:26 -0600 Subject: [PATCH] Feat/srs 343 (#673) * test bcbox env values * test bcbox env values in openshift * test bcbox env values * adding secrets * adding bc box envs * update env variables * update the env value * update env * update env --- .github/openshift/deploy.frontend.yml | 19 +++++++++++++++++-- .github/workflows/ci-cd-openshift-dev.yaml | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/openshift/deploy.frontend.yml b/.github/openshift/deploy.frontend.yml index 8b4ddf4b..20c33db5 100644 --- a/.github/openshift/deploy.frontend.yml +++ b/.github/openshift/deploy.frontend.yml @@ -55,9 +55,9 @@ objects: - apiVersion: v1 kind: ConfigMap metadata: - name: ${NAME}-config + name: ${NAME}epd-config data: - config.js: "// runtime-config.js vars\n window[\"_env_\"] = {\n \"REACT_APP_NODE_ENV\": \"production\",\n \"REACT_APP_AUTH_AUTHORITY\": \"https://epd-keycloak-${ENV}.apps.silver.devops.gov.bc.ca/auth/realms/forms-flow-ai/\",\n \"REACT_APP_AUTH_CLIENT_ID\": \"${REACT_APP_AUTH_CLIENT_ID}\",\n \"REACT_APP_AUTH_REDIRECT_URI\": \"https://forms-flow-web-root-config-${ENV}.apps.silver.devops.gov.bc.ca/\", \n \"REACT_APP_AUTH_LOGOUT_REDIRECT_URI\": \"https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://epd-keycloak-${ENV}.apps.silver.devops.gov.bc.ca/auth/realms/forms-flow-ai/protocol/openid-connect/logout?post_logout_redirect_uri=https://epd-frontend-${ENV}.apps.silver.devops.gov.bc.ca\",\n \"REACT_APP_AUTH_RESPONSE_TYPE\": \"code\",\n \"REACT_APP_AUTH_SCOPE\": \"openid profile\",\n \"REACT_APP_BACKEND_API\": \"https://epd-backend-gateway-${ENV}.apps.silver.devops.gov.bc.ca\", \n \"REACT_APP_AUTH_FILTER_PROTOCOL_CLAIMS\": \"true\",\n \"REACT_APP_AUTH_LOAD_USER_INFO\": \"true\", \n \"REACT_APP_AUTH_REVOKE_TOKENS_ON_SIGNOUT\": \"true\",\n \"REACT_APP_FORMSFLOW_WEB_URL\": \"https://forms-flow-web-root-config-${ENV}.apps.silver.devops.gov.bc.ca/\",\n \"REACT_APP_CUSTOM_MAP_URL\": \"https://epd-frontend-${ENV}.apps.silver.devops.gov.bc.ca/map\"\n }" + config.js: "// runtime-config.js vars\n window[\"_env_\"] = {\n \"REACT_APP_NODE_ENV\": \"production\",\n \"REACT_APP_AUTH_AUTHORITY\": \"https://epd-keycloak-${ENV}.apps.silver.devops.gov.bc.ca/auth/realms/forms-flow-ai/\",\n \"REACT_APP_AUTH_CLIENT_ID\": \"${REACT_APP_AUTH_CLIENT_ID}\",\n \"REACT_APP_AUTH_REDIRECT_URI\": \"https://epd-frontend-${ENV}.apps.silver.devops.gov.bc.ca/dashboard\", \n \"REACT_APP_AUTH_LOGOUT_REDIRECT_URI\": \"https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://epd-keycloak-${ENV}.apps.silver.devops.gov.bc.ca/auth/realms/forms-flow-ai/protocol/openid-connect/logout?post_logout_redirect_uri=https://epd-frontend-${ENV}.apps.silver.devops.gov.bc.ca\",\n \"REACT_APP_AUTH_RESPONSE_TYPE\": \"code\",\n \"REACT_APP_AUTH_SCOPE\": \"openid profile\",\n \"REACT_APP_BACKEND_API\": \"https://epd-backend-gateway-${ENV}.apps.silver.devops.gov.bc.ca\", \n \"REACT_APP_AUTH_FILTER_PROTOCOL_CLAIMS\": \"true\",\n \"REACT_APP_AUTH_LOAD_USER_INFO\": \"true\", \n \"REACT_APP_AUTH_REVOKE_TOKENS_ON_SIGNOUT\": \"true\",\n \"REACT_APP_FORMSFLOW_WEB_URL\": \"https://forms-flow-web-root-config-${ENV}.apps.silver.devops.gov.bc.ca/\",\n \"REACT_APP_CUSTOM_MAP_URL\": \"https://epd-frontend-${ENV}.apps.silver.devops.gov.bc.ca/map\",\n \"REACT_APP_BACKEND_USERS_API\": \"https://epd-backend-users-${ENV}.apps.silver.devops.gov.bc.ca/\",\n \"REACT_APP_BCBOX_BASE_URL\": \"https://common-object-management-service-coms-custom-e38158-${ENV}.apps.silver.devops.gov.bc.ca\",\n \"REACT_APP_BCBOX_APP_URL\": \"https://bcbox-e38158-${ENV}.apps.silver.devops.gov.bc.ca\",\n \"REACT_APP_BCBOX_BUCKET_URL\": \"/api/v1/bucket\",\n \"REACT_APP_BCBOX_FIND_USER_ENDPOINT\": \"api/v1/user?email=\",\n \"REACT_APP_BCBOX_SET_USER_PERMISSION\": \"/api/v1/permission/bucket/\",\n \"REACT_APP_BCBOX_FILE_UPLOAD_ENDPOINT\": \"api/v1/object?bucketId=\",\n \"REACT_APP_COMS_ENDPOINT\": \"https://nrs.objectstore.gov.bc.ca\",\n \"REACT_APP_COMS_BUCKET\": \"${REACT_APP_COMS_BUCKET}\",\n \"REACT_APP_COMS_ACCESS_KEY_ID\": \"${REACT_APP_COMS_ACCESS_KEY_ID}\",\n \"REACT_APP_COMS_ACCESS_KEY\": \"${REACT_APP_COMS_ACCESS_KEY}\",\n \"REACT_APP_COMS_ACCESS_REGION\": \"ca-central-1\" \n }" - apiVersion: v1 kind: ImageStream metadata: @@ -109,6 +109,21 @@ objects: env: - name: REACT_APP_AUTH_REDIRECT_URI value: https://${NAME}-frontend-${ENV}.${DOMAIN} + - name: REACT_APP_COMS_BUCKET + valueFrom: + secretKeyRef: + name: ${NAME}-bc-box + key: REACT_APP_COMS_BUCKET + - name: REACT_APP_COMS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + name: ${NAME}-bc-box + key: REACT_APP_COMS_ACCESS_KEY_ID + - name: REACT_APP_COMS_ACCESS_KEY + valueFrom: + secretKeyRef: + name: ${NAME}-bc-box + key: REACT_APP_COMS_ACCESS_KEY ports: - containerPort: ${{CONTAINER_PORT}} protocol: TCP diff --git a/.github/workflows/ci-cd-openshift-dev.yaml b/.github/workflows/ci-cd-openshift-dev.yaml index 70dcfc14..5eb73e30 100644 --- a/.github/workflows/ci-cd-openshift-dev.yaml +++ b/.github/workflows/ci-cd-openshift-dev.yaml @@ -5,7 +5,7 @@ on: push: branches: - 'dev' - - 'feat/task-228' #test1 + - 'feat/srs-343' #test2 paths: - 'backend/**'