-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: enhance chart multi version release process (#1985)
- support multi-version in the release workflow - customize generate-chart-matrix action - set ci snapshot version based on the chart dir name - rename chart dir camunda-platform to camunda-platform-latest - update generate-release-notes.sh to work with multi-version --------- Signed-off-by: Ahmed AbouZaid <[email protected]>
- Loading branch information
Showing
295 changed files
with
155 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,50 +57,100 @@ jobs: | |
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Chart Releaser | ||
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 | ||
with: | ||
install_only: true | ||
env: | ||
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
CR_SKIP_EXISTING: 'true' | ||
- name: Add Helm repos | ||
run: | | ||
make helm.repos-add | ||
- name: Update Helm dependency | ||
run: | | ||
export chartPath="charts/camunda-platform*" | ||
make helm.dependency-update | ||
chartPath="$(ct list-changed | tr '\n' ' ')" \ | ||
make helm.dependency-update | ||
- name: cosign-installer | ||
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0 | ||
- name: Set Helm chart version var | ||
run: | | ||
CHART_NAME="$(yq '.name' charts/camunda-platform/Chart.yaml)" | ||
CHART_VERSION="$(yq '.version' charts/camunda-platform/Chart.yaml)" | ||
echo "CHART_NAME_WITH_VERSION=${CHART_NAME}-${CHART_VERSION}" | tee -a $GITHUB_ENV | ||
# TODO: Move this step to pre-release workflow when we have it. | ||
- name: Generate release note footer | ||
run: | | ||
make release.generate-notes-footer | ||
- name: Tidy up | ||
run: | | ||
# Clean up badges from readme to avoid showing them in Artifact Hub. | ||
sed -ri '/Badge .+/d' charts/camunda-platform/README.md | ||
- name: Run Chart Releaser | ||
sed -ri '/Badge .+/d' charts/camunda-platform-latest/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. | ||
# | ||
|
||
# Release previous versions. | ||
- name: Pre-Release - Previous versions | ||
run: | | ||
rm -rf charts/camunda-platform-latest | ||
- name: Run Chart Releaser - Previous versions | ||
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 | ||
with: | ||
config: .github/config/chart-releaser.yaml | ||
env: | ||
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
CR_SKIP_EXISTING: 'true' | ||
- name: Post-Release - Previous versions | ||
run: | | ||
mv .cr-release-packages/* release-packages/ | ||
git checkout :/ | ||
# Release the latest version. | ||
- name: Pre-Release - Latest version | ||
run: | | ||
rm -rf charts/camunda-platform-8* | ||
- name: Run Chart Releaser - Latest version | ||
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 | ||
with: | ||
config: .github/config/chart-releaser.yaml | ||
env: | ||
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
CR_SKIP_EXISTING: 'true' | ||
- name: Post-Release - Latest version | ||
run: | | ||
mv .cr-release-packages/* release-packages/ | ||
git checkout :/ | ||
# Sign and upload the signature of the chart package. | ||
- name: Set Helm chart vars | ||
run: | | ||
CHART_PACKAGES="$(find release-packages -maxdepth 1 -name "camunda-platform*.tgz" \ | ||
-exec basename {} \; | xargs)" | ||
echo "CHART_PACKAGES=${CHART_PACKAGES}" | tee -a $GITHUB_ENV | ||
- name: Sign Helm chart with Cosign | ||
run: | | ||
cosign sign-blob -y .cr-release-packages/${CHART_NAME_WITH_VERSION}.tgz \ | ||
--bundle ${CHART_NAME_WITH_VERSION}.cosign.bundle | ||
for chart_package in ${CHART_PACKAGES}; do | ||
echo "Package: ${chart_package}" | ||
cosign sign-blob -y release-packages/${chart_package} \ | ||
--bundle "${chart_package%.*}.cosign.bundle" | ||
done | ||
- name: Verify signed Helm chart with Cosign | ||
run: | | ||
cosign verify-blob .cr-release-packages/${CHART_NAME_WITH_VERSION}.tgz \ | ||
--bundle ./${CHART_NAME_WITH_VERSION}.cosign.bundle \ | ||
--certificate-identity "https://github.com/${GITHUB_WORKFLOW_REF}" \ | ||
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" | ||
for chart_package in ${CHART_PACKAGES}; do | ||
echo "Package: ${chart_package}" | ||
cosign verify-blob release-packages/${chart_package} \ | ||
--bundle "${chart_package%.*}.cosign.bundle" \ | ||
--certificate-identity "https://github.com/${GITHUB_WORKFLOW_REF}" \ | ||
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" | ||
done | ||
- name: Upload Helm chart signature bundle | ||
run: | | ||
gh release upload "${CHART_NAME_WITH_VERSION}" \ | ||
./${CHART_NAME_WITH_VERSION}.cosign.bundle \ | ||
--repo "${GITHUB_REPOSITORY}" | ||
for chart_package in ${CHART_PACKAGES}; do | ||
echo "Package: ${chart_package}" | ||
gh release upload "${chart_package%.*}" \ | ||
"${chart_package%.*}.cosign.bundle" \ | ||
--repo "${GITHUB_REPOSITORY}" | ||
done | ||
env: | ||
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
|
||
|
@@ -113,7 +163,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | ||
with: | ||
# The verify step happens in the "release" branch before merging to the "main" branch. | ||
# The verification step happens in the "release" branch before merging into the "main" branch. | ||
ref: release | ||
fetch-depth: 0 | ||
- name: Install env dependencies | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
helm 3.15.1 | ||
# The kubectl version depends on the K8s CI cluster version | ||
kubectl 1.27.14 | ||
kustomize 5.4.2 | ||
git-chglog 0.15.4 | ||
golang 1.22.4 | ||
# Task is mainly used to run tests locally or in the CI pipeline. | ||
task 3.30.1 | ||
gomplate v3.11.8 | ||
git-chglog 0.15.4 | ||
yq 4.44.1 | ||
helm 3.15.1 | ||
kubectl 1.27.14 # The kubectl version depends on the K8s CI cluster version | ||
kustomize 5.4.2 | ||
task 3.30.1 # Task is mainly used to run tests locally or in the CI pipeline. | ||
yamllint 1.35.1 | ||
yq 4.44.1 |
Oops, something went wrong.