Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: GEO-1090 Hotfix pipeline fixes #829

Merged
merged 10 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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