Skip to content

Commit

Permalink
debug version-matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
aabouzaid committed Jun 10, 2024
1 parent 585f4f6 commit a858c48
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 82 deletions.
162 changes: 81 additions & 81 deletions .github/workflows/chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,89 +21,89 @@ permissions:
contents: read

jobs:
release:
if: ${{ contains(github.event.*.labels.*.name, 'release') || github.event.inputs.trigger }}
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
fetch-depth: 0
- name: Install env dependencies
uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6 # v3
- name: Remove Dev Comments
run: |
TARGET_FILES=(
"charts/camunda-platform*/values*.yaml"
"charts/camunda-platform*/Chart.yaml"
)
for FILE in "${TARGET_FILES[@]}"; do
sed -i '/# START DEV COMMENT/,/# END DEV COMMENT/d' $FILE
done
echo "Dev comments removed:"
git --no-pager diff
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Add Helm repos
run: |
make helm.repos-add
- name: Update Helm dependency
run: |
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: Clean up release readme
run: |
sed -ri '/Badge .+/d' charts/camunda-platform/README.md
- name: Run Chart Releaser
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: 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
- 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"
- name: Upload Helm chart signature bundle
run: |
gh release upload "${CHART_NAME_WITH_VERSION}" \
./${CHART_NAME_WITH_VERSION}.cosign.bundle \
--repo "${GITHUB_REPOSITORY}"
env:
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
# release:
# if: ${{ contains(github.event.*.labels.*.name, 'release') || github.event.inputs.trigger }}
# runs-on: ubuntu-latest
# permissions:
# contents: write
# id-token: write
# steps:
# - name: Checkout
# uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
# with:
# fetch-depth: 0
# - name: Install env dependencies
# uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6 # v3
# - name: Remove Dev Comments
# run: |
# TARGET_FILES=(
# "charts/camunda-platform*/values*.yaml"
# "charts/camunda-platform*/Chart.yaml"
# )
# for FILE in "${TARGET_FILES[@]}"; do
# sed -i '/# START DEV COMMENT/,/# END DEV COMMENT/d' $FILE
# done
# echo "Dev comments removed:"
# git --no-pager diff
# - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
# with:
# path: |
# ~/.cache/go-build
# ~/go/pkg/mod
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-go-
# - name: Configure Git
# run: |
# git config user.name "$GITHUB_ACTOR"
# git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
# - name: Add Helm repos
# run: |
# make helm.repos-add
# - name: Update Helm dependency
# run: |
# 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: Clean up release readme
# run: |
# sed -ri '/Badge .+/d' charts/camunda-platform/README.md
# - name: Run Chart Releaser
# 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: 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
# - 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"
# - name: Upload Helm chart signature bundle
# run: |
# gh release upload "${CHART_NAME_WITH_VERSION}" \
# ./${CHART_NAME_WITH_VERSION}.cosign.bundle \
# --repo "${GITHUB_REPOSITORY}"
# env:
# GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

post-release:
needs: release
#needs: release
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-version-matrix.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -euo pipefail
set -euox pipefail

# Check dependencies.
dep_names="awk git gomplate helm jq tr yq"
Expand Down

0 comments on commit a858c48

Please sign in to comment.