Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed AbouZaid <6760103+aabouzaid@users.noreply.github.com>
  • Loading branch information
aabouzaid committed Oct 4, 2024
1 parent bab9b2a commit 4c440b2
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chart-public-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
mkdir -p camunda-platform/values
# Latest version.
cp -a main/charts/camunda-platform-latest/values-latest.yaml camunda-platform/values/values-latest.yaml
cp -a main/charts/camunda-platform-8.6/values-latest.yaml camunda-platform/values/values-latest.yaml
# Previous versions.
find main/charts -name "camunda-platform-*" | while read chart_id; do
Expand Down
32 changes: 26 additions & 6 deletions .github/workflows/chart-release-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
push:
branches:
- main
- 2404-aa-rename-camunda-chart-latest-dir
paths:
- .github/workflows/chart-release-snapshot.yaml
- charts/camunda-platform-latest/**
- charts/camunda-platform-alpha/**

jobs:
Expand Down Expand Up @@ -54,11 +54,31 @@ jobs:
fail-fast: false
matrix:
chart:
- name: Helm Chart Latest rolling
directory: charts/camunda-platform-latest
- name: Helm Chart rolling - 8.2
directory: charts/camunda-platform-8.2
versionSuffix: snapshot-8.2
override: true
- name: Helm Chart rolling - 8.3
directory: charts/camunda-platform-8.3
versionSuffix: snapshot-8.3
override: true
- name: Helm Chart rolling - 8.4
directory: charts/camunda-platform-8.4
versionSuffix: snapshot-8.4
override: true
- name: Helm Chart rolling - 8.5
directory: charts/camunda-platform-8.5
versionSuffix: snapshot-8.5
override: true
- name: Helm Chart rolling - 8.6
directory: charts/camunda-platform-8.6
versionSuffix: snapshot-8.6
override: true
- name: Helm Chart rolling - Latest
directory: charts/camunda-platform-8.6
versionSuffix: snapshot-latest
override: true
- name: Helm Chart Alpha rolling
- name: Helm Chart rolling - Alpha
directory: charts/camunda-platform-alpha
versionSuffix: snapshot-alpha
override: true
Expand Down Expand Up @@ -109,8 +129,8 @@ jobs:
"false")
# If the artfact exists, then it will not republished.
helm pull oci://ghcr.io/${{ env.REPOSITORY_NAME }}/${{ env.CHART_NAME }} \
--version ${{ env.CHART_VERSION }} 2> /dev/null
test $? -eq 0 && PUBLISH_ARTIFACT="false" || PUBLISH_ARTIFACT="true"
--version ${{ env.CHART_VERSION }} 2> /dev/null && EXIT_CODE=0 || EXIT_CODE=1
test ${EXIT_CODE} -eq 0 && PUBLISH_ARTIFACT="false" || PUBLISH_ARTIFACT="true"
;;
*)
echo "Unsupported value."
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,24 @@ jobs:
- name: Tidy up
run: |
# Clean up badges from readme to avoid showing them in Artifact Hub.
sed -ri '/Badge .+/d' charts/camunda-platform-latest/README.md
sed -ri '/Badge .+/d' charts/camunda-platform-8*/README.md
mkdir release-packages
#
# We run Chart Releaser twice as a workaround because it's not possible to control the release order.
# CR by default will release "camunda-platform-10.x.x" first then "camunda-platform-8.x.x",
# however, we want the latest version to show as the latest release in GitHub releases.
#


- name: Get latest version name
run: |
latest_chart_version_dir="$(ls -d1 charts/camunda-platform-8* | tail -n1)"
echo "LATEST_CHART_VERSION_DIR=${latest_chart_version_dir}" | tee -a $GITHUB_ENV
# Release previous versions.
- name: Pre-Release - Previous versions
run: |
rm -rf charts/camunda-platform-latest
rm -rf ${LATEST_CHART_VERSION_DIR}
rm -rf charts/camunda-platform-alpha
- name: Run Chart Releaser - Previous versions
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
Expand All @@ -106,7 +111,7 @@ jobs:
# Release the latest version.
- name: Pre-Release - Latest version
run: |
rm -rf charts/camunda-platform-8*
rm -rf $(ls -d1 charts/camunda-platform-8* | head -n -1)
rm -rf charts/camunda-platform-alpha
- name: Run Chart Releaser - Latest version
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chart-validate-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
type: string
camunda-helm-dir:
required: false
default: camunda-platform-latest
default: camunda-platform-alpha
type: string

permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples/test-helm-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# https://github.com/camunda/camunda-platform-helm/blob/main/docs/gha-workflows.md#workflow-inputs
with:
identifier: "<USE_CASE>-${{ github.event.pull_request.number }}"
camunda-helm-dir: "camunda-platform-latest"
camunda-helm-dir: "camunda-platform-alpha"
# For full value options (ensure to select the correct chart version from the right side):
# https://artifacthub.io/packages/helm/camunda/camunda-platform
extra-values: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integration-rosa-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
type: string
camunda-helm-dir:
required: false
default: camunda-platform-latest
default: camunda-platform-alpha
type: string
camunda-helm-git-ref:
default: main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integration-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
type: string
camunda-helm-dir:
required: false
default: camunda-platform-latest
default: camunda-platform-alpha
type: string
camunda-helm-git-ref:
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-unit-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
type: string
camunda-helm-dir:
required: false
default: camunda-platform-latest
default: camunda-platform-alpha
type: string

concurrency:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test-version-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
paths:
- '.github/workflows/test-integration-template.yaml'
- '.github/workflows/test-version-latest.yaml'
- 'charts/camunda-platform-latest/**'
workflow_dispatch: { }

concurrency:
Expand All @@ -29,15 +28,15 @@ jobs:
uses: ./.github/workflows/chart-validate-template.yaml
with:
identifier: "${{ github.event.pull_request.number }}-vald-latest"
camunda-helm-dir: "camunda-platform-latest"
camunda-helm-dir: "camunda-platform-8.6"
camunda-helm-git-ref: "${{ github.event.pull_request.head.sha }}"

unit:
name: Unit Test - Camunda Latest
uses: ./.github/workflows/test-unit-template.yml
with:
identifier: "${{ github.event.pull_request.number }}-unit-latest"
camunda-helm-dir: "camunda-platform-latest"
camunda-helm-dir: "camunda-platform-8.6"
camunda-helm-git-ref: "${{ github.event.pull_request.head.sha }}"

integration:
Expand All @@ -54,6 +53,6 @@ jobs:
deployment-ttl: "${{ contains(github.event.pull_request.labels.*.name, 'test-persistent') && '1w' || '' }}"
platforms: "gke,rosa"
flows: "install,upgrade"
camunda-helm-dir: "camunda-platform-latest"
camunda-helm-dir: "camunda-platform-8.6"
camunda-helm-git-ref: "${{ github.event.pull_request.head.sha }}"
caller-git-ref: "${{ github.event.pull_request.head.sha }}"
4 changes: 2 additions & 2 deletions docs/gha-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
# A reference for the Camunda Helm chart directory which allows to test unreleased chagnes from Git repo.
# The latest supported chart doesn't have a version in its directory name like `camunda-platform`.
# The previous releases have the Camunda version in their directory name e.g. `camunda-platform-8.4`.
# Default: 'camunda-platform-latest'
# Default: 'camunda-platform-alpha'
# Required: false
camunda-helm-dir: 'camunda-platform-latest'
camunda-helm-dir: 'camunda-platform-alpha'

# Pass extra values to the Helm chart during deployment
# Default: ''
Expand Down

0 comments on commit 4c440b2

Please sign in to comment.