From 9bd13d6d64ca2248973876d0e413bd92d700f6ce Mon Sep 17 00:00:00 2001 From: catherine meng Date: Thu, 7 Jul 2022 12:31:17 -0700 Subject: [PATCH 1/5] feat/frontend: trigger pipeline testing --- frontend/src/App.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index e219e1ed0a..0c8223843e 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -2,7 +2,7 @@
- Hello World + Hello World !
From 3b4c7d3726aa8eb30a925746de83d792152e4dd4 Mon Sep 17 00:00:00 2001 From: catherine meng Date: Thu, 7 Jul 2022 12:39:57 -0700 Subject: [PATCH 2/5] fix: fix frontend test; remove backend comment; added token to pr open pipeline --- .github/workflows/pr-open.yml | 2 ++ backend/src/main.ts | 3 --- frontend/src/tests/MainHeader.spec.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 0a8d682ae0..c3efaf290a 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -49,6 +49,7 @@ jobs: with: registry: ${{ env.REGISTRY }} repository: ${{ github.repository }} + token: ${{ secrets.GHCR_TOKEN }} target: prod-backend tags: | ${{ github.event.number }}-backend @@ -91,6 +92,7 @@ jobs: with: registry: ${{ env.REGISTRY }} repository: ${{ github.repository }} + token: ${{ secrets.GHCR_TOKEN }} target: prod-frontend tags: | ${{ github.event.number }}-frontend diff --git a/backend/src/main.ts b/backend/src/main.ts index 8013bc4ac0..72310689a1 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -14,9 +14,6 @@ async function bootstrap() { if (!origin || whitelist.indexOf(origin) !== -1) { callback(null, true); } - // else { - // callback(new Error('Not allowed by CORS')); - // } }, }); diff --git a/frontend/src/tests/MainHeader.spec.ts b/frontend/src/tests/MainHeader.spec.ts index 4ccf7cc88d..6cf90ba663 100644 --- a/frontend/src/tests/MainHeader.spec.ts +++ b/frontend/src/tests/MainHeader.spec.ts @@ -6,6 +6,6 @@ import MainHeader from "../common/MainHeader.vue"; describe("MainHeader", () => { it("renders properly", () => { const wrapper = mount(MainHeader); - expect(wrapper.text()).toContain("FSA - Old Growth"); + expect(wrapper.text()).toContain("FSA - Forest Client"); }); }); From 3ccc911d8cee14a991cd968e532775c4e557488e Mon Sep 17 00:00:00 2001 From: catherine meng Date: Thu, 7 Jul 2022 12:48:39 -0700 Subject: [PATCH 3/5] fix/pipeline: disabled email service variable --- .github/openshift/deploy.backend.yml | 74 ++++++++++++++-------------- .github/workflows/pr-open.yml | 8 +-- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/openshift/deploy.backend.yml b/.github/openshift/deploy.backend.yml index 6126ca8234..a40f805b51 100644 --- a/.github/openshift/deploy.backend.yml +++ b/.github/openshift/deploy.backend.yml @@ -38,31 +38,31 @@ parameters: - name: PROMOTE description: Image (namespace/name:tag) to promote/import value: bcgov/nr-old-growth:prod-backend - - name: EMAIL_USERNAME - description: CHES service client - required: true - - name: EMAIL_PASSWORD - description: CHES service client password - required: true - - name: EMAIL_TOKEN_URL - description: CHES authentication url - required: true - - name: EMAIL_API_URL - description: CHES email api url - required: true + # - name: EMAIL_USERNAME + # description: CHES service client + # required: true + # - name: EMAIL_PASSWORD + # description: CHES service client password + # required: true + # - name: EMAIL_TOKEN_URL + # description: CHES authentication url + # required: true + # - name: EMAIL_API_URL + # description: CHES email api url + # required: true - name: NODE_ENV description: environment mode required: true objects: - - apiVersion: v1 - kind: Secret - metadata: - name: ${NAME}-${ZONE}-${COMPONENT} - labels: - app: ${NAME}-${ZONE} - stringData: - email-username: "${EMAIL_USERNAME}" - email-password: "${EMAIL_PASSWORD}" + # - apiVersion: v1 + # kind: Secret + # metadata: + # name: ${NAME}-${ZONE}-${COMPONENT} + # labels: + # app: ${NAME}-${ZONE} + # stringData: + # email-username: "${EMAIL_USERNAME}" + # email-password: "${EMAIL_PASSWORD}" - apiVersion: v1 kind: ImageStream metadata: @@ -133,22 +133,22 @@ objects: value: https://${NAME}-${ZONE}-frontend.${DOMAIN} - name: BACKEND_URL value: https://${NAME}-${ZONE}-backend.${DOMAIN} - - name: EMAIL_USERNAME - valueFrom: - secretKeyRef: - name: ${NAME}-${ZONE}-${COMPONENT} - key: email-username - - name: EMAIL_PASSWORD - valueFrom: - secretKeyRef: - name: ${NAME}-${ZONE}-${COMPONENT} - key: email-password - - name: EMAIL_TOKEN_URL - value: ${EMAIL_TOKEN_URL} - - name: EMAIL_API_URL - value: ${EMAIL_API_URL} - - name: EMAIL_FROM - value: "FSA_donotreply@gov.bc.ca" + # - name: EMAIL_USERNAME + # valueFrom: + # secretKeyRef: + # name: ${NAME}-${ZONE}-${COMPONENT} + # key: email-username + # - name: EMAIL_PASSWORD + # valueFrom: + # secretKeyRef: + # name: ${NAME}-${ZONE}-${COMPONENT} + # key: email-password + # - name: EMAIL_TOKEN_URL + # value: ${EMAIL_TOKEN_URL} + # - name: EMAIL_API_URL + # value: ${EMAIL_API_URL} + # - name: EMAIL_FROM + # value: "FSA_donotreply@gov.bc.ca" - name: NODE_ENV value: ${NODE_ENV} diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index c3efaf290a..1702ae0a06 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -358,10 +358,10 @@ jobs: # Process and apply template oc process -f .github/openshift/deploy.backend.yml -p ZONE=${{ env.ZONE }} \ -p PROMOTE=${{ github.repository }}:${{ env.ZONE }}-backend \ - -p EMAIL_USERNAME=${{ secrets.CHES_SERVICE_CLIENT }} \ - -p EMAIL_PASSWORD=${{ secrets.CHES_CLIENT_PASSWORD }} \ - -p EMAIL_TOKEN_URL='https://dev.oidc.gov.bc.ca/auth/realms/jbd6rnxw/protocol/openid-connect/token' \ - -p EMAIL_API_URL='https://ches-dev.apps.silver.devops.gov.bc.ca/api/v1' \ + # -p EMAIL_USERNAME=${{ secrets.CHES_SERVICE_CLIENT }} \ + # -p EMAIL_PASSWORD=${{ secrets.CHES_CLIENT_PASSWORD }} \ + # -p EMAIL_TOKEN_URL='https://dev.oidc.gov.bc.ca/auth/realms/jbd6rnxw/protocol/openid-connect/token' \ + # -p EMAIL_API_URL='https://ches-dev.apps.silver.devops.gov.bc.ca/api/v1' \ -p NODE_ENV='development' | oc apply -f - # Clean previous image, if rebuilding From 476ba42012854a6496bb9a5665b5e2cd52dfb54e Mon Sep 17 00:00:00 2001 From: catherine meng Date: Thu, 7 Jul 2022 12:53:02 -0700 Subject: [PATCH 4/5] fix/pipeline: fix comment error --- .github/workflows/pr-open.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 1702ae0a06..1c7a5e27a5 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -358,11 +358,12 @@ jobs: # Process and apply template oc process -f .github/openshift/deploy.backend.yml -p ZONE=${{ env.ZONE }} \ -p PROMOTE=${{ github.repository }}:${{ env.ZONE }}-backend \ + -p NODE_ENV='development' | oc apply -f - # -p EMAIL_USERNAME=${{ secrets.CHES_SERVICE_CLIENT }} \ # -p EMAIL_PASSWORD=${{ secrets.CHES_CLIENT_PASSWORD }} \ # -p EMAIL_TOKEN_URL='https://dev.oidc.gov.bc.ca/auth/realms/jbd6rnxw/protocol/openid-connect/token' \ - # -p EMAIL_API_URL='https://ches-dev.apps.silver.devops.gov.bc.ca/api/v1' \ - -p NODE_ENV='development' | oc apply -f - + # -p EMAIL_API_URL='https://ches-dev.apps.silver.devops.gov.bc.ca/api/v1' | oc apply -f - + # Clean previous image, if rebuilding if [ ${{ needs.build-backend.outputs.build == 'true' }} ] From dacb621f2925b23526c351a9bfe0afd3d774bc31 Mon Sep 17 00:00:00 2001 From: catherine meng Date: Thu, 7 Jul 2022 13:02:33 -0700 Subject: [PATCH 5/5] fix/frontend: update project title --- frontend/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/index.html b/frontend/index.html index 533b7511d7..82542a1b38 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -11,7 +11,7 @@ - Old growth + Forest Client