From 1106d22a923553a852cef47c8d699e01f11baa81 Mon Sep 17 00:00:00 2001 From: Sukanya Rath <98050194+sukanya-rath@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:19:15 -0700 Subject: [PATCH 1/9] fix: GEO-1090 - hotfix pipeline testing (#826) Signed-off-by: Sukanya Rath --- admin-frontend/e2e/pages/announcements/announcements-page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-frontend/e2e/pages/announcements/announcements-page.ts b/admin-frontend/e2e/pages/announcements/announcements-page.ts index 3ce2dc69a..f4fed948f 100644 --- a/admin-frontend/e2e/pages/announcements/announcements-page.ts +++ b/admin-frontend/e2e/pages/announcements/announcements-page.ts @@ -20,7 +20,7 @@ export class AnnouncementsPage extends AdminPortalPage { async setup() { await super.setup(); this.addAnnouncementButton = await this.page.getByRole('link', { - name: 'Add Announcement', + name: 'Add a Announcementsss', }); this.searchInput = await this.page.getByLabel('Search by title'); this.searchButton = await this.page.getByRole('button', { name: 'Search' }); From 601f54bb9d8d87b7d87e729465bf90a943232d47 Mon Sep 17 00:00:00 2001 From: Sukanya Rath <98050194+sukanya-rath@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:14:14 -0700 Subject: [PATCH 2/9] fix: deployer to ignore extra semver GEO-1090 (#828) --- .github/workflows/.deploy.yml | 3 +++ .github/workflows/cd-to-prod-on-workflow-dispatch.yml | 6 ++++++ .github/workflows/cd-to-test-on-workflow-dispatch.yml | 7 ++++++- admin-frontend/src/components/Header.vue | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/.deploy.yml b/.github/workflows/.deploy.yml index cdf5c92ea..590eb79cc 100644 --- a/.github/workflows/.deploy.yml +++ b/.github/workflows/.deploy.yml @@ -95,6 +95,9 @@ jobs: - name: Package HELM Chart shell: bash run: | + # remove the excess part from semver, for example: x.x.x_* -> x.x.x + semver=$(echo ${{ inputs.semver }} | cut -d'_' -f1) + echo "Semver: $semver" helm package -u --app-version="${{ inputs.tag }}" --version=${{ inputs.semver }} ./${{ inputs.directory }} - name: Deploy to OpenShift diff --git a/.github/workflows/cd-to-prod-on-workflow-dispatch.yml b/.github/workflows/cd-to-prod-on-workflow-dispatch.yml index f8f3a79e1..6604de6b7 100644 --- a/.github/workflows/cd-to-prod-on-workflow-dispatch.yml +++ b/.github/workflows/cd-to-prod-on-workflow-dispatch.yml @@ -7,12 +7,18 @@ on: tag: description: "The Docker Tag to deploy, it would be the latest tagged version that you want to deploy from TEST to PROD." required: true + is_hotfix: + description: "Is this a hotfix deployment?" + required: false + default: false + type: boolean concurrency: group: ${{ github.workflow }} cancel-in-progress: true jobs: image-promotions-to-prod: # This is just for adding another tag to the image to reflect which docker tag is deployed to PROD. + if: ${{ !github.event.inputs.is_hotfix }} name: Image Promotions to PROD runs-on: ubuntu-22.04 permissions: diff --git a/.github/workflows/cd-to-test-on-workflow-dispatch.yml b/.github/workflows/cd-to-test-on-workflow-dispatch.yml index 75ad37a60..f776f4c8d 100644 --- a/.github/workflows/cd-to-test-on-workflow-dispatch.yml +++ b/.github/workflows/cd-to-test-on-workflow-dispatch.yml @@ -8,13 +8,18 @@ on: tag: description: "The Docker Tag to deploy, it would be the latest tagged version that you want to deploy from dev to TEST." required: true - + is_hotfix: + description: "Is this a hotfix deployment?" + required: false + default: false + type: boolean concurrency: group: ${{ github.workflow }} cancel-in-progress: true jobs: image-promotions-to-test: # This is just for adding another tag to the image to reflect which docker tag is deployed to TEST. + if: ${{ !github.event.inputs.is_hotfix }} name: Image Promotions to TEST runs-on: ubuntu-22.04 permissions: diff --git a/admin-frontend/src/components/Header.vue b/admin-frontend/src/components/Header.vue index 83cd2c924..a8920cd1d 100644 --- a/admin-frontend/src/components/Header.vue +++ b/admin-frontend/src/components/Header.vue @@ -23,7 +23,7 @@ @click="redirectToLogout()" data-testid="logout-btn" > - Logout + Logouts From ee4c07393116a4a746e95573de77f0e7d425e746 Mon Sep 17 00:00:00 2001 From: Sukanya Rath <98050194+sukanya-rath@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:17:22 -0700 Subject: [PATCH 3/9] remove image promotion as a a need --- .github/workflows/cd-to-prod-on-workflow-dispatch.yml | 1 - .github/workflows/cd-to-test-on-workflow-dispatch.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/cd-to-prod-on-workflow-dispatch.yml b/.github/workflows/cd-to-prod-on-workflow-dispatch.yml index 6604de6b7..fa0e1a584 100644 --- a/.github/workflows/cd-to-prod-on-workflow-dispatch.yml +++ b/.github/workflows/cd-to-prod-on-workflow-dispatch.yml @@ -44,7 +44,6 @@ jobs: tags: prod deploys: name: Deploys (prod) - needs: [image-promotions-to-prod] uses: ./.github/workflows/.deploy.yml secrets: inherit with: diff --git a/.github/workflows/cd-to-test-on-workflow-dispatch.yml b/.github/workflows/cd-to-test-on-workflow-dispatch.yml index f776f4c8d..4793357d7 100644 --- a/.github/workflows/cd-to-test-on-workflow-dispatch.yml +++ b/.github/workflows/cd-to-test-on-workflow-dispatch.yml @@ -45,7 +45,6 @@ jobs: tags: test deploys: name: Deploys (test) - needs: [image-promotions-to-test] uses: ./.github/workflows/.deploy.yml secrets: inherit with: From 380a13e8f22245d4280cfd9fe8657446b768c722 Mon Sep 17 00:00:00 2001 From: Sukanya Rath <98050194+sukanya-rath@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:20:00 -0700 Subject: [PATCH 4/9] fixing semver --- .github/workflows/.deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.deploy.yml b/.github/workflows/.deploy.yml index 590eb79cc..7b2f976d4 100644 --- a/.github/workflows/.deploy.yml +++ b/.github/workflows/.deploy.yml @@ -98,7 +98,7 @@ jobs: # remove the excess part from semver, for example: x.x.x_* -> x.x.x semver=$(echo ${{ inputs.semver }} | cut -d'_' -f1) echo "Semver: $semver" - helm package -u --app-version="${{ inputs.tag }}" --version=${{ inputs.semver }} ./${{ inputs.directory }} + helm package -u --app-version="${{ inputs.tag }}" --version=${semver} ./${{ inputs.directory }} - name: Deploy to OpenShift shell: bash From fb421161cd6c344b5dab659ff2586b1891a0a273 Mon Sep 17 00:00:00 2001 From: Sukanya Rath <98050194+sukanya-rath@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:25:01 -0700 Subject: [PATCH 5/9] add variable setting step --- .github/workflows/.deploy.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/.deploy.yml b/.github/workflows/.deploy.yml index 7b2f976d4..3af134364 100644 --- a/.github/workflows/.deploy.yml +++ b/.github/workflows/.deploy.yml @@ -71,6 +71,14 @@ jobs: UI_PRIVATE_KEY: | ${{ secrets.UI_PRIVATE_KEY }} steps: + - name: Set Variables + id: vars + shell: bash + run: | + # remove the excess part from semver, for example: x.x.x_* -> x.x.x + semver=$(echo ${{ inputs.semver }} | cut -d'_' -f1) + echo "Semver: $semver" + echo "semver: $semver" >> $GITHUB_OUTPUT - uses: actions/checkout@v4 name: checkout - name: Login to OpenShift @@ -95,10 +103,7 @@ jobs: - name: Package HELM Chart shell: bash run: | - # remove the excess part from semver, for example: x.x.x_* -> x.x.x - semver=$(echo ${{ inputs.semver }} | cut -d'_' -f1) - echo "Semver: $semver" - helm package -u --app-version="${{ inputs.tag }}" --version=${semver} ./${{ inputs.directory }} + helm package -u --app-version="${{ inputs.tag }}" --version=${{ steps.vars.outputs.semver }} ${{ inputs.directory }} - name: Deploy to OpenShift shell: bash @@ -164,7 +169,7 @@ jobs: --set-string crunchy.pgBackRest.s3.secretKey="${{ secrets.S3_SECRET_ACCESS_KEY }}" \ --set-string global.secrets.clamavApiKey="${{ secrets.CLAMAV_API_KEY }}" \ ${{ inputs.params }} \ - --timeout "$DEPLOY_TIMEOUT"m ./${{ github.event.repository.name }}-${{ inputs.semver }}.tgz + --timeout "$DEPLOY_TIMEOUT"m ./${{ github.event.repository.name }}-${{ steps.vars.outputs.semver }}.tgz - name: Print HELM Chart History shell: bash From 162c4ce5463fc6520126d8403bbcf66012059dd8 Mon Sep 17 00:00:00 2001 From: Sukanya Rath <98050194+sukanya-rath@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:26:44 -0700 Subject: [PATCH 6/9] fix syntax --- .github/workflows/.deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.deploy.yml b/.github/workflows/.deploy.yml index 3af134364..208541479 100644 --- a/.github/workflows/.deploy.yml +++ b/.github/workflows/.deploy.yml @@ -78,7 +78,7 @@ jobs: # remove the excess part from semver, for example: x.x.x_* -> x.x.x semver=$(echo ${{ inputs.semver }} | cut -d'_' -f1) echo "Semver: $semver" - echo "semver: $semver" >> $GITHUB_OUTPUT + echo "semver: ${semver}" >> $GITHUB_OUTPUT - uses: actions/checkout@v4 name: checkout - name: Login to OpenShift From 58b0574571c47990ff6d7dd82c5866470a018d5f Mon Sep 17 00:00:00 2001 From: Sukanya Rath <98050194+sukanya-rath@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:28:18 -0700 Subject: [PATCH 7/9] more syntax fix --- .github/workflows/.deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.deploy.yml b/.github/workflows/.deploy.yml index 208541479..d5cdacb0f 100644 --- a/.github/workflows/.deploy.yml +++ b/.github/workflows/.deploy.yml @@ -78,7 +78,7 @@ jobs: # remove the excess part from semver, for example: x.x.x_* -> x.x.x semver=$(echo ${{ inputs.semver }} | cut -d'_' -f1) echo "Semver: $semver" - echo "semver: ${semver}" >> $GITHUB_OUTPUT + echo "semver=${semver}" >> $GITHUB_OUTPUT - uses: actions/checkout@v4 name: checkout - name: Login to OpenShift From 9924ed1ff00e97c3a3207e2a29331290c885e1bc Mon Sep 17 00:00:00 2001 From: Sukanya Rath <98050194+sukanya-rath@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:36:17 -0700 Subject: [PATCH 8/9] removed s --- admin-frontend/src/components/Header.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-frontend/src/components/Header.vue b/admin-frontend/src/components/Header.vue index a8920cd1d..83cd2c924 100644 --- a/admin-frontend/src/components/Header.vue +++ b/admin-frontend/src/components/Header.vue @@ -23,7 +23,7 @@ @click="redirectToLogout()" data-testid="logout-btn" > - Logouts + Logout From 25e6f2d080aa81b77ebae95e44e1d6b290299d0c Mon Sep 17 00:00:00 2001 From: Sukanya Rath <98050194+sukanya-rath@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:38:34 -0700 Subject: [PATCH 9/9] updateds text --- admin-frontend/e2e/pages/announcements/announcements-page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-frontend/e2e/pages/announcements/announcements-page.ts b/admin-frontend/e2e/pages/announcements/announcements-page.ts index f4fed948f..3ce2dc69a 100644 --- a/admin-frontend/e2e/pages/announcements/announcements-page.ts +++ b/admin-frontend/e2e/pages/announcements/announcements-page.ts @@ -20,7 +20,7 @@ export class AnnouncementsPage extends AdminPortalPage { async setup() { await super.setup(); this.addAnnouncementButton = await this.page.getByRole('link', { - name: 'Add a Announcementsss', + name: 'Add Announcement', }); this.searchInput = await this.page.getByLabel('Search by title'); this.searchButton = await this.page.getByRole('button', { name: 'Search' });