diff --git a/.github/workflows/create_tag.yml b/.github/workflows/create_tag.yml index 74848b2a..e152a6ad 100644 --- a/.github/workflows/create_tag.yml +++ b/.github/workflows/create_tag.yml @@ -20,14 +20,14 @@ on: workflow_dispatch: inputs: version: - description: 'Version Number' + description: "Version Number" required: true jobs: tag_image: name: Tag Image # ubuntu-latest can also be used. - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 environment: dev outputs: @@ -35,35 +35,34 @@ jobs: SELECTOR: ${{ steps.deploy-and-expose.outputs.selector }} steps: - - name: Check out repository - uses: actions/checkout@v2 + - name: Check out repository + uses: actions/checkout@v2 - - name: Create tag - uses: actions/github-script@v6 - with: - script: | - github.rest.git.createRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: 'refs/tags/${{ github.event.inputs.version }}', - force: true, - sha: context.sha - }) + - name: Create tag + uses: actions/github-script@v6 + with: + script: | + github.rest.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: 'refs/tags/${{ github.event.inputs.version }}', + force: true, + sha: context.sha + }) - - name: Install oc - uses: redhat-actions/openshift-tools-installer@v1 - with: - oc: 4 + - name: Install oc + uses: redhat-actions/openshift-tools-installer@v1 + with: + oc: 4 - # https://github.com/redhat-actions/oc-login#readme - - uses: actions/checkout@v2 - - name: Tag in OpenShift - run: | - set -eux - # Login to OpenShift and select project - oc login --token=${{ env.OPENSHIFT_TOKEN }} --server=${{ env.OPENSHIFT_SERVER }} - oc project ${{ env.OPENSHIFT_NAMESPACE }} - - oc tag ${{ env.NAMESPACE }}-dev/${{ env.REPO_NAME }}-frontend:latest ${{ env.NAMESPACE }}-dev/${{ env.REPO_NAME }}-frontend:${{ github.event.inputs.version }} - oc tag ${{ env.NAMESPACE }}-dev/${{ env.REPO_NAME }}-backend:latest ${{ env.NAMESPACE }}-dev/${{ env.REPO_NAME }}-backend:${{ github.event.inputs.version }} - + # https://github.com/redhat-actions/oc-login#readme + - uses: actions/checkout@v2 + - name: Tag in OpenShift + run: | + set -eux + # Login to OpenShift and select project + oc login --token=${{ env.OPENSHIFT_TOKEN }} --server=${{ env.OPENSHIFT_SERVER }} + oc project ${{ env.OPENSHIFT_NAMESPACE }} + + oc tag ${{ env.NAMESPACE }}-dev/${{ env.REPO_NAME }}-frontend:latest ${{ env.NAMESPACE }}-dev/${{ env.REPO_NAME }}-frontend:${{ github.event.inputs.version }} + oc tag ${{ env.NAMESPACE }}-dev/${{ env.REPO_NAME }}-backend:latest ${{ env.NAMESPACE }}-dev/${{ env.REPO_NAME }}-backend:${{ github.event.inputs.version }} diff --git a/.github/workflows/deploy-backend-to-ocp-prod.yml b/.github/workflows/deploy-backend-to-ocp-prod.yml index 8c973405..76e871fd 100644 --- a/.github/workflows/deploy-backend-to-ocp-prod.yml +++ b/.github/workflows/deploy-backend-to-ocp-prod.yml @@ -19,7 +19,7 @@ env: DOCKER_ARTIFACTORY_REPO: artifacts.developer.gov.bc.ca/docker-remote ARTIFACTORY_REPO: artifacts.developer.gov.bc.ca - APP_NAME: 'educ-grad-admin' + APP_NAME: "educ-grad-admin" REPO_NAME: "educ-grad-admin" BRANCH: "main" APP_NAME_BACKEND: "educ-grad-admin-backend" @@ -47,7 +47,7 @@ jobs: openshift-ci-cd: name: Deploy Backend to PROD # ubuntu-latest can also be used. - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 environment: prod outputs: diff --git a/.github/workflows/deploy-backend-to-ocp-test.yml b/.github/workflows/deploy-backend-to-ocp-test.yml index 86fb9ba7..beb7bd85 100644 --- a/.github/workflows/deploy-backend-to-ocp-test.yml +++ b/.github/workflows/deploy-backend-to-ocp-test.yml @@ -19,7 +19,7 @@ env: DOCKER_ARTIFACTORY_REPO: artifacts.developer.gov.bc.ca/docker-remote ARTIFACTORY_REPO: artifacts.developer.gov.bc.ca - APP_NAME: 'educ-grad-admin' + APP_NAME: "educ-grad-admin" REPO_NAME: "educ-grad-admin" BRANCH: "main" APP_NAME_BACKEND: "educ-grad-admin-backend" @@ -38,7 +38,7 @@ env: MIN_MEM: "200Mi" MAX_MEM: "250Mi" MIN_REPLICAS: "3" - MAX_REPLICAS: "3" + MAX_REPLICAS: "5" on: workflow_dispatch: @@ -47,7 +47,7 @@ jobs: openshift-ci-cd: name: Deploy Backend to TEST # ubuntu-latest can also be used. - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 environment: test outputs: @@ -93,6 +93,6 @@ jobs: oc rollout status dc/${{ env.IMAGE_NAME }}-dc - name: ZAP Scan - uses: zaproxy/action-full-scan@v0.3.0 + uses: zaproxy/action-full-scan@v0.10.0 with: - target: 'https://educ-grad-admin-bbe4c3-test.apps.silver.devops.gov.bc.ca' + target: "https://educ-grad-admin-bbe4c3-test.apps.silver.devops.gov.bc.ca" diff --git a/.github/workflows/deploy-frontend-to-ocp-prod.yml b/.github/workflows/deploy-frontend-to-ocp-prod.yml index c17674c1..dd46dbf5 100644 --- a/.github/workflows/deploy-frontend-to-ocp-prod.yml +++ b/.github/workflows/deploy-frontend-to-ocp-prod.yml @@ -19,7 +19,7 @@ env: DOCKER_ARTIFACTORY_REPO: artifacts.developer.gov.bc.ca/docker-remote ARTIFACTORY_REPO: artifacts.developer.gov.bc.ca - APP_NAME: 'educ-grad-admin' + APP_NAME: "educ-grad-admin" REPO_NAME: "educ-grad-admin" BRANCH: "main" APP_NAME_FRONTEND: "educ-grad-admin-frontend" @@ -46,7 +46,7 @@ jobs: openshift-ci-cd: name: Deploy Frontend to PROD # ubuntu-latest can also be used. - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 environment: prod outputs: @@ -84,7 +84,7 @@ jobs: oc process -f tools/openshift/frontend-dc.yaml -p REPO_NAME=educ-grad-admin \ -p HOST_ROUTE=grad.gov.bc.ca -p NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \ -p APP_NAME=educ-grad-admin -p TAG=${{ steps.get-latest-tag.outputs.tag }} -p MIN_REPLICAS=${{ env.MIN_REPLICAS }} -p MAX_REPLICAS=${{ env.MAX_REPLICAS }} -p MIN_CPU=${{ env.MIN_CPU }} -p MAX_CPU=${{ env.MAX_CPU }} -p MIN_MEM=${{ env.MIN_MEM }} -p MAX_MEM=${{ env.MAX_MEM }} | oc apply -f - - + # Start rollout (if necessary) and follow it oc rollout latest dc/${{ env.IMAGE_NAME }}-dc 2> /dev/null \ || true && echo "Rollout in progress" diff --git a/.github/workflows/deploy-frontend-to-ocp-test.yml b/.github/workflows/deploy-frontend-to-ocp-test.yml index 6f0eb2b0..9b6ba9f4 100644 --- a/.github/workflows/deploy-frontend-to-ocp-test.yml +++ b/.github/workflows/deploy-frontend-to-ocp-test.yml @@ -19,7 +19,7 @@ env: DOCKER_ARTIFACTORY_REPO: artifacts.developer.gov.bc.ca/docker-remote ARTIFACTORY_REPO: artifacts.developer.gov.bc.ca - APP_NAME: 'educ-grad-admin' + APP_NAME: "educ-grad-admin" REPO_NAME: "educ-grad-admin" BRANCH: "main" APP_NAME_FRONTEND: "educ-grad-admin-frontend" @@ -34,7 +34,7 @@ env: MIN_MEM: "200Mi" MAX_MEM: "250Mi" MIN_REPLICAS: "3" - MAX_REPLICAS: "3" + MAX_REPLICAS: "5" # SITE_URL should have no scheme or port. It will be prepended with https:// HOST_ROUTE: ${{ secrets.SITE_URL }} @@ -46,7 +46,7 @@ jobs: openshift-ci-cd: name: Deploy Frontend to TEST # ubuntu-latest can also be used. - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 environment: test outputs: @@ -84,7 +84,7 @@ jobs: oc process -f tools/openshift/frontend-dc.yaml -p REPO_NAME=educ-grad-admin \ -p HOST_ROUTE=educ-grad-admin-bbe4c3-test.apps.silver.devops.gov.bc.ca -p NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} \ -p APP_NAME=educ-grad-admin -p TAG=${{ steps.get-latest-tag.outputs.tag }} -p MIN_REPLICAS=${{ env.MIN_REPLICAS }} -p MAX_REPLICAS=${{ env.MAX_REPLICAS }} -p MIN_CPU=${{ env.MIN_CPU }} -p MAX_CPU=${{ env.MAX_CPU }} -p MIN_MEM=${{ env.MIN_MEM }} -p MAX_MEM=${{ env.MAX_MEM }} | oc apply -n bbe4c3-test -f - - + # Start rollout (if necessary) and follow it oc rollout latest dc/${{ env.IMAGE_NAME }}-dc 2> /dev/null \ || true && echo "Rollout in progress" @@ -94,6 +94,6 @@ jobs: oc rollout status dc/${{ env.IMAGE_NAME }}-dc - name: ZAP Scan - uses: zaproxy/action-full-scan@v0.3.0 + uses: zaproxy/action-full-scan@v0.10.0 with: - target: 'https://educ-grad-admin-bbe4c3-test.apps.silver.devops.gov.bc.ca' + target: "https://educ-grad-admin-bbe4c3-test.apps.silver.devops.gov.bc.ca" diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 8e6c93ed..349c542a 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -58,8 +58,8 @@

Your session has expired. Please Login.

- Your session is about to expire in {{ timerValue }} seconds. Do - you want to extend your session? + Your session is about to expire in {{ timeRemaining }} seconds. + Do you want to extend your session?