Skip to content

Commit

Permalink
fix: GEO-1090 Hotfix pipeline fixes (#829)
Browse files Browse the repository at this point in the history
Signed-off-by: Sukanya Rath <[email protected]>
  • Loading branch information
sukanya-rath authored Oct 29, 2024
1 parent 61a0b5b commit 3d8e47d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -95,7 +103,7 @@ jobs:
- name: Package HELM Chart
shell: bash
run: |
helm package -u --app-version="${{ inputs.tag }}" --version=${{ inputs.semver }} ./${{ inputs.directory }}
helm package -u --app-version="${{ inputs.tag }}" --version=${{ steps.vars.outputs.semver }} ${{ inputs.directory }}
- name: Deploy to OpenShift
shell: bash
Expand Down Expand Up @@ -161,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
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/cd-to-prod-on-workflow-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -38,7 +44,6 @@ jobs:
tags: prod
deploys:
name: Deploys (prod)
needs: [image-promotions-to-prod]
uses: ./.github/workflows/.deploy.yml
secrets: inherit
with:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/cd-to-test-on-workflow-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -40,7 +45,6 @@ jobs:
tags: test
deploys:
name: Deploys (test)
needs: [image-promotions-to-test]
uses: ./.github/workflows/.deploy.yml
secrets: inherit
with:
Expand Down

0 comments on commit 3d8e47d

Please sign in to comment.