From eab552957ae97b0ab9036360619ad0d1165a0c11 Mon Sep 17 00:00:00 2001 From: Ahmed AbouZaid <6760103+aabouzaid@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:07:35 +0200 Subject: [PATCH] wip --- .github/workflows/chart-public-files.yaml | 3 -- .github/workflows/chart-release-snapshot.yaml | 28 ++++++++++++++++--- .github/workflows/chart-release.yaml | 13 ++++++--- .../workflows/chart-validate-template.yaml | 2 +- .../workflows/examples/test-helm-chart.yaml | 2 +- .../test-integration-rosa-template.yaml | 2 +- .../workflows/test-integration-template.yaml | 2 +- .github/workflows/test-unit-template.yml | 2 +- .github/workflows/test-version-latest.yaml | 7 ++--- docs/gha-workflows.md | 4 +-- 10 files changed, 43 insertions(+), 22 deletions(-) diff --git a/.github/workflows/chart-public-files.yaml b/.github/workflows/chart-public-files.yaml index f7e3d41531..cc4cbd5748 100644 --- a/.github/workflows/chart-public-files.yaml +++ b/.github/workflows/chart-public-files.yaml @@ -35,9 +35,6 @@ jobs: # Values files. mkdir -p camunda-platform/values - # Latest version. - cp -a main/charts/camunda-platform-latest/values-latest.yaml camunda-platform/values/values-latest.yaml - # Previous versions. find main/charts -name "camunda-platform-*" | while read chart_id; do camunda_version="$(echo ${chart_id} | cut -d '-' -f 3)"; diff --git a/.github/workflows/chart-release-snapshot.yaml b/.github/workflows/chart-release-snapshot.yaml index 9fcb199280..e621a5ef68 100644 --- a/.github/workflows/chart-release-snapshot.yaml +++ b/.github/workflows/chart-release-snapshot.yaml @@ -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: @@ -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 diff --git a/.github/workflows/chart-release.yaml b/.github/workflows/chart-release.yaml index 9a5525f1d9..7e584299ff 100644 --- a/.github/workflows/chart-release.yaml +++ b/.github/workflows/chart-release.yaml @@ -77,7 +77,7 @@ 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 # @@ -85,11 +85,16 @@ jobs: # 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 @@ -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 diff --git a/.github/workflows/chart-validate-template.yaml b/.github/workflows/chart-validate-template.yaml index 93a7971408..e96745f225 100644 --- a/.github/workflows/chart-validate-template.yaml +++ b/.github/workflows/chart-validate-template.yaml @@ -13,7 +13,7 @@ on: type: string camunda-helm-dir: required: false - default: camunda-platform-latest + default: camunda-platform-alpha type: string permissions: diff --git a/.github/workflows/examples/test-helm-chart.yaml b/.github/workflows/examples/test-helm-chart.yaml index 984a7900fd..8771cd5b74 100644 --- a/.github/workflows/examples/test-helm-chart.yaml +++ b/.github/workflows/examples/test-helm-chart.yaml @@ -22,7 +22,7 @@ jobs: # https://github.com/camunda/camunda-platform-helm/blob/main/docs/gha-workflows.md#workflow-inputs with: identifier: "-${{ 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: | diff --git a/.github/workflows/test-integration-rosa-template.yaml b/.github/workflows/test-integration-rosa-template.yaml index c2b5b8f972..8b21272afe 100644 --- a/.github/workflows/test-integration-rosa-template.yaml +++ b/.github/workflows/test-integration-rosa-template.yaml @@ -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 diff --git a/.github/workflows/test-integration-template.yaml b/.github/workflows/test-integration-template.yaml index c07f92212f..7defd262f3 100644 --- a/.github/workflows/test-integration-template.yaml +++ b/.github/workflows/test-integration-template.yaml @@ -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 diff --git a/.github/workflows/test-unit-template.yml b/.github/workflows/test-unit-template.yml index f5058b0fa1..35eabd1c26 100644 --- a/.github/workflows/test-unit-template.yml +++ b/.github/workflows/test-unit-template.yml @@ -13,7 +13,7 @@ on: type: string camunda-helm-dir: required: false - default: camunda-platform-latest + default: camunda-platform-alpha type: string concurrency: diff --git a/.github/workflows/test-version-latest.yaml b/.github/workflows/test-version-latest.yaml index 3edc39f700..0c9581b399 100644 --- a/.github/workflows/test-version-latest.yaml +++ b/.github/workflows/test-version-latest.yaml @@ -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: @@ -29,7 +28,7 @@ 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: @@ -37,7 +36,7 @@ jobs: 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: @@ -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 }}" diff --git a/docs/gha-workflows.md b/docs/gha-workflows.md index 55a555a99d..e4eb205ebe 100644 --- a/docs/gha-workflows.md +++ b/docs/gha-workflows.md @@ -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: ''