Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/bcgov/EDUC-GRAD-ADMIN into …
Browse files Browse the repository at this point in the history
…sam-student-profile
  • Loading branch information
suzalflueck committed Nov 1, 2024
2 parents 8115939 + cdfdc75 commit 9683fef
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 66 deletions.
61 changes: 30 additions & 31 deletions .github/workflows/create_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,49 @@ 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:
ROUTE: ${{ steps.deploy-and-expose.outputs.route }}
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/deploy-backend-to-ocp-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-backend-to-ocp-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -38,7 +38,7 @@ env:
MIN_MEM: "200Mi"
MAX_MEM: "250Mi"
MIN_REPLICAS: "3"
MAX_REPLICAS: "3"
MAX_REPLICAS: "5"

on:
workflow_dispatch:
Expand All @@ -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:
Expand Down Expand Up @@ -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"
6 changes: 3 additions & 3 deletions .github/workflows/deploy-frontend-to-ocp-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand Down Expand Up @@ -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"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deploy-frontend-to-ocp-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 }}
Expand All @@ -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:
Expand Down Expand Up @@ -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"
Expand All @@ -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"
4 changes: 2 additions & 2 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<v-card-text>
<p v-if="tokenExpired">Your session has expired. Please Login.</p>
<p v-else>
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?
</p>
</v-card-text>

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
valid IDIR.
</v-card-text>
<v-card-actions>
<v-btn color="primary" variant="text" href="authRoutes.LOGIN">
<a :href="authRoutes.LOGIN">Login</a>
<v-btn color="primary" variant="text" :href="authRoutes.LOGIN">
Login
</v-btn>
</v-card-actions>
</v-card>
Expand Down
26 changes: 14 additions & 12 deletions frontend/src/views/Logout.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
<template>
<v-container fluid class="full-height">
<v-row align="center">
<v-col cols="10" sm="10" md="8" lg="4" xl="3">
<v-card class="session-expired-card">
<v-card-title class="gov-header">
<v-row>
<v-spacer />
<v-col cols="12" md="4" lg="4">
<v-card class="pt-3 pb-4">
<v-card-title>
<h4 id="logout_text">Logged Out</h4>
</v-card-title>
<v-card-text id="logout_descriptor">
<v-row style="margin: 0.3rem">You have Logged out.</v-row>
You have Logged out of the Graduation Administration Application.
</v-card-text>
<v-card-actions>
<v-btn
@click="clearStorage"
:href="Routes.LOGIN"
class="ma-1"
dark
color="#003366"
>Log In</v-btn
variant="text"
:href="routes.LOGIN"
color="primary"
>Login</v-btn
>
<span>&nbsp;again if you wish to continue.</span>
</v-card-text>
</v-card-actions>
</v-card>
</v-col>
<v-spacer />
</v-row>
</v-container>
</template>
Expand Down
6 changes: 3 additions & 3 deletions grad-version
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": {
"dev": "1.13.0",
"test": "1.13.0",
"prod": "1.12.0"
"dev": "1.26.0",
"test": "1.25.0",
"prod": "1.25.0"
}
}

0 comments on commit 9683fef

Please sign in to comment.