From ebc520a8399ea44d230b409ee8e5bcea0ebba926 Mon Sep 17 00:00:00 2001 From: Ricardo Campos Date: Tue, 7 Nov 2023 14:44:27 -0300 Subject: [PATCH 1/2] fix: prod deployment --- .github/workflows/merge.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index af854d78..b0618b1f 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -118,13 +118,12 @@ jobs: - name: backend parameters: -p PROMOTE=${{ github.repository }}/backend:test + verification_path: "actuator/health" - name: frontend parameters: - -p PROMOTE=${{ github.repository }}/frontend:test - paratemeters: -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 }}" + -p PROMOTE=${{ github.repository }}/frontend:test steps: - uses: bcgov-nr/action-deployer-openshift@v1.4.0 with: From 94548100bdd68df76054bf74ffd2485830a76399 Mon Sep 17 00:00:00 2001 From: Ricardo Campos Date: Tue, 7 Nov 2023 16:22:08 -0300 Subject: [PATCH 2/2] fix: promote variable and environments --- .github/workflows/merge.yml | 7 +------ .github/workflows/pr-open.yml | 2 -- backend/openshift.deploy.yml | 5 +---- frontend/openshift.deploy.yml | 8 ++++---- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index b0618b1f..8a2e71c9 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -63,14 +63,11 @@ jobs: include: - name: database - name: backend - parameters: - -p PROMOTE=${{ github.repository }}/backend:test verification_path: "actuator/health" - name: frontend 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 PROMOTE=${{ github.repository }}/frontend:test steps: - uses: bcgov-nr/action-deployer-openshift@v1.4.0 with: @@ -116,14 +113,12 @@ jobs: include: - name: database - name: backend - parameters: - -p PROMOTE=${{ github.repository }}/backend:test verification_path: "actuator/health" - name: frontend 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 PROMOTE=${{ github.repository }}/frontend:test + -p VITE_REDIRECT_SIGN_OUT="${{ vars.VITE_REDIRECT_SIGN_OUT }}" steps: - uses: bcgov-nr/action-deployer-openshift@v1.4.0 with: diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 8cf56d41..2adbc72e 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -97,7 +97,6 @@ jobs: triggers: ('common/' 'database/' 'backend/' 'frontend/') verification_path: /actuator/health parameters: - -p PROMOTE=${{ github.repository }}/backend:${{ github.event.number }} -p MIN_REPLICAS=1 -p MAX_REPLICAS=2 - name: frontend @@ -106,7 +105,6 @@ jobs: 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 PROMOTE=${{ github.repository }}/frontend:${{ github.event.number }} -p MIN_REPLICAS=1 -p MAX_REPLICAS=2 steps: diff --git a/backend/openshift.deploy.yml b/backend/openshift.deploy.yml index 16df2ef1..fa45a1cc 100644 --- a/backend/openshift.deploy.yml +++ b/backend/openshift.deploy.yml @@ -35,9 +35,6 @@ parameters: - name: ORG_NAME description: Organization name, e.g. bcgov value: bcgov - - name: PROMOTE - description: Image (namespace/name:tag) to promote/import - value: bcgov/quickstart-openshift-backends/backend:test - name: DB_POOL_CONN_TIMEOUT description: Maximum number of milliseconds that a client will wait for a connection from the pool. value: "90000" @@ -61,7 +58,7 @@ objects: - name: "${IMAGE_TAG}" from: kind: DockerImage - name: "${REGISTRY}/${PROMOTE}" + name: ${REGISTRY}/${ORG_NAME}/${NAME}/${COMPONENT}:${ZONE} referencePolicy: type: Local - apiVersion: v1 diff --git a/frontend/openshift.deploy.yml b/frontend/openshift.deploy.yml index 5db41e0b..ba787a2a 100644 --- a/frontend/openshift.deploy.yml +++ b/frontend/openshift.deploy.yml @@ -10,6 +10,9 @@ parameters: - name: COMPONENT description: Component name value: frontend + - name: ORG_NAME + description: Organization name + value: bcgov - name: ZONE description: Deployment zone, e.g. pr-### or prod required: true @@ -35,9 +38,6 @@ parameters: - name: REGISTRY description: Container registry to import from (internal is image-registry.openshift-image-registry.svc:5000) value: ghcr.io - - name: PROMOTE - description: Image (namespace/name:tag) to promote/import - value: bcgov/nr-silva/frontend:prod - 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" @@ -63,7 +63,7 @@ objects: - name: ${IMAGE_TAG} from: kind: DockerImage - name: ${REGISTRY}/${PROMOTE} + name: ${REGISTRY}/${ORG_NAME}/${NAME}/${COMPONENT}:${ZONE} referencePolicy: type: Local - apiVersion: v1