From 7ab7d03ca107fd8475bb9223b26eb5f7c7922956 Mon Sep 17 00:00:00 2001 From: Kuan Fan Date: Wed, 29 Jan 2025 13:18:51 -0800 Subject: [PATCH 1/4] initial changes for 3.0.0 --- .github/workflows/dev-ci.yaml | 8 ++++---- .github/workflows/dev-release.yaml | 6 +++--- .github/workflows/prod-ci.yaml | 2 +- .github/workflows/test-ci.yaml | 2 +- .github/workflows/tfrs-release.yaml | 4 ++-- .pipeline/lib/config.js | 6 +++--- frontend/package.json | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/dev-ci.yaml b/.github/workflows/dev-ci.yaml index a43bb307a..a20f30f79 100644 --- a/.github/workflows/dev-ci.yaml +++ b/.github/workflows/dev-ci.yaml @@ -1,8 +1,8 @@ -name: TFRS New Pipeline Dev release-2.22.0 +name: TFRS New Pipeline Dev release-3.0.0 on: push: - branches: [release-2.22.0] + branches: [release-3.0.0] paths: - frontend/** - backend/** @@ -13,7 +13,7 @@ env: GIT_URL: https://github.com/bcgov/tfrs.git TOOLS_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools DEV_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev - GIT_REF: "release-2.22.0" + GIT_REF: "release-3.0.0" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -58,7 +58,7 @@ jobs: steps: - id: get-version run: | - echo "VERSION=2.22.0" >> $GITHUB_OUTPUT + echo "VERSION=3.0.0" >> $GITHUB_OUTPUT build-backend: name: Build tfrs Backend diff --git a/.github/workflows/dev-release.yaml b/.github/workflows/dev-release.yaml index 5729ef144..85991c584 100644 --- a/.github/workflows/dev-release.yaml +++ b/.github/workflows/dev-release.yaml @@ -1,11 +1,11 @@ ## For each release, the value of name, branches, RELEASE_NAME and PR_NUMBER need to be adjusted accordingly ## For each release, update lib/config.js: version and releaseBranch -name: TFRS Dev release-2.22.0 +name: TFRS Dev release-3.0.0 on: push: - branches: [release-2.22.0] + branches: [release-3.0.0] paths: - frontend/** - backend/** @@ -16,7 +16,7 @@ env: ## The pull request number of the Tracking pull request to merge the release branch to main ## Also remember to update the version in .pipeline/lib/config.js PR_NUMBER: 2913 - RELEASE_NAME: release-2.22.0 + RELEASE_NAME: release-3.0.0 concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/prod-ci.yaml b/.github/workflows/prod-ci.yaml index 48317a2c9..1c2e2a4be 100644 --- a/.github/workflows/prod-ci.yaml +++ b/.github/workflows/prod-ci.yaml @@ -1,4 +1,4 @@ -name: TFRS New Pipeline Prod release-2.22.0 +name: TFRS New Pipeline Prod release-3.0.0 on: workflow_dispatch: diff --git a/.github/workflows/test-ci.yaml b/.github/workflows/test-ci.yaml index 17da9eb8d..59dfc2abf 100644 --- a/.github/workflows/test-ci.yaml +++ b/.github/workflows/test-ci.yaml @@ -1,4 +1,4 @@ -name: TFRS New Pipeline Test release-2.22.0 +name: TFRS New Pipeline Test release-3.0.0 on: workflow_dispatch: diff --git a/.github/workflows/tfrs-release.yaml b/.github/workflows/tfrs-release.yaml index 2d3a51cd6..6db5da859 100644 --- a/.github/workflows/tfrs-release.yaml +++ b/.github/workflows/tfrs-release.yaml @@ -1,7 +1,7 @@ ## For each release, the value of name, branches, RELEASE_NAME and PR_NUMBER need to be adjusted accordingly ## For each release, update lib/config.js: version and releaseBranch -name: TFRS release-2.22.0 +name: TFRS release-3.0.0 on: workflow_dispatch: @@ -11,7 +11,7 @@ env: ## The pull request number of the Tracking pull request to merge the release branch to main ## Also remember to update the version in .pipeline/lib/config.js PR_NUMBER: 2913 - RELEASE_NAME: release-2.22.0 + RELEASE_NAME: release-3.0.0 concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.pipeline/lib/config.js b/.pipeline/lib/config.js index 277473545..602b1aaa8 100644 --- a/.pipeline/lib/config.js +++ b/.pipeline/lib/config.js @@ -1,7 +1,7 @@ "use strict"; const options = require("@bcgov/pipeline-cli").Util.parseArguments(); const changeId = options.pr; //aka pull-request -const version = "2.22.0"; +const version = "3.0.0"; const name = "tfrs"; const ocpName = "apps.silver.devops"; @@ -20,7 +20,7 @@ const phases = { instance: `${name}-build-${changeId}`, version: `${version}-${changeId}`, tag: `build-${version}-${changeId}`, - releaseBranch: "release-2.22.0", + releaseBranch: "release-3.0.0", }, dev: { namespace: "0ab226-dev", @@ -264,4 +264,4 @@ process.on("unhandledRejection", (reason) => { process.exit(1); }); -module.exports = exports = { phases, options }; \ No newline at end of file +module.exports = exports = { phases, options }; diff --git a/frontend/package.json b/frontend/package.json index 65a6cfc72..767ff001e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "tfrs", - "version": "2.22.0", + "version": "3.0.0", "dependencies": { "@babel/eslint-parser": "^7.19.1", "@babel/plugin-proposal-object-rest-spread": "^7.20.7", From 5489bad3f09b4ad24aaf7968d250f75eba5c174c Mon Sep 17 00:00:00 2001 From: Kuan Fan Date: Wed, 29 Jan 2025 13:22:18 -0800 Subject: [PATCH 2/4] update PR number --- .github/workflows/dev-release.yaml | 2 +- .github/workflows/tfrs-release.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev-release.yaml b/.github/workflows/dev-release.yaml index 85991c584..9c04cc09b 100644 --- a/.github/workflows/dev-release.yaml +++ b/.github/workflows/dev-release.yaml @@ -15,7 +15,7 @@ on: env: ## The pull request number of the Tracking pull request to merge the release branch to main ## Also remember to update the version in .pipeline/lib/config.js - PR_NUMBER: 2913 + PR_NUMBER: 2956 RELEASE_NAME: release-3.0.0 concurrency: diff --git a/.github/workflows/tfrs-release.yaml b/.github/workflows/tfrs-release.yaml index 6db5da859..3ea44dd1d 100644 --- a/.github/workflows/tfrs-release.yaml +++ b/.github/workflows/tfrs-release.yaml @@ -10,7 +10,7 @@ on: env: ## The pull request number of the Tracking pull request to merge the release branch to main ## Also remember to update the version in .pipeline/lib/config.js - PR_NUMBER: 2913 + PR_NUMBER: 2956 RELEASE_NAME: release-3.0.0 concurrency: @@ -88,7 +88,7 @@ jobs: cd .pipeline npm install npm run build -- --pr=${{ env.PR_NUMBER }} --env=build - + # comment out deploy-on-test as the deployment configs have been repaced by deployments at 2.21.1 # deploy-on-test: # name: Deploy TFRS on Test From 68d6d06819fdfdf12d43ade48b6943ac6fa04e43 Mon Sep 17 00:00:00 2001 From: Hamed Valiollahi Date: Thu, 6 Mar 2025 14:16:21 -0800 Subject: [PATCH 3/4] refactor: ensure correct login redirection with environment-based callback URL (#2958) --- frontend/src/actions/keycloakActions.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/src/actions/keycloakActions.js b/frontend/src/actions/keycloakActions.js index eb72f16f7..ac1d094ab 100644 --- a/frontend/src/actions/keycloakActions.js +++ b/frontend/src/actions/keycloakActions.js @@ -59,13 +59,18 @@ export const logoutKeycloakUser = () => ({ }) export const login = (idpHint = IDENTITY_PROVIDERS.IDIR) => (dispatch) => { - const kc = keycloak() - kc.login({ - pkceMethod: 'S256', - redirectUri: CONFIG.KEYCLOAK.CALLBACK_URL, - idpHint - }) -} + const kc = keycloak() + + const currentPath = window.location.pathname + window.location.search + window.location.hash + const callbackWithoutSlash = CONFIG.KEYCLOAK.CALLBACK_URL.replace(/\/$/,"") + const redirectUri = `${callbackWithoutSlash}${currentPath}` + + kc.login({ + pkceMethod: 'S256', + redirectUri, + idpHint + }) + } export const logout = () => (dispatch) => { const userAuth = store.getState().userAuth From 1b0fde6058a5f10e4183dc69102e3e5d4cd58f3f Mon Sep 17 00:00:00 2001 From: Alex Zorkin <47334977+AlexZorkin@users.noreply.github.com> Date: Thu, 6 Mar 2025 12:24:10 -1000 Subject: [PATCH 4/4] chore: version updates (#2961) --- frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index 767ff001e..d0399930a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -28,7 +28,7 @@ "jest-environment-jsdom": "^29.4.3", "jsonwebtoken": "^9.0.0", "jwks-rsa": "^2.0.0", - "keycloak-js": "^19.0.3", + "keycloak-js": "^26.1.2", "lodash": "^4.17.21", "mini-css-extract-plugin": "^2.6.1", "minimist": "^1.2.7",