From dfaf9ce170188857e45e8c4b595d5e6ea40c3383 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Wed, 17 Jul 2024 18:18:00 -0700 Subject: [PATCH 01/12] docs(readme): clean up installation section --- charts/cryostat/README.md | 50 +++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/charts/cryostat/README.md b/charts/cryostat/README.md index 2db89326..7e273ce7 100644 --- a/charts/cryostat/README.md +++ b/charts/cryostat/README.md @@ -1,13 +1,49 @@ # Cryostat Helm Chart -A Helm chart for deploying [Cryostat](https://cryostat.io/) on Kubernetes and OpenShift -## Installing +![Version: 2.0.0-dev](https://img.shields.io/badge/Version-2.0.0--dev-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.0.0-dev](https://img.shields.io/badge/AppVersion-4.0.0--dev-informational?style=flat-square) -The Cryostat Helm Chart is available to install from various locations: -- `helm repo add cryostat https://cryostat.io/helm-charts ; helm search repo cryostat ; helm install cryostat cryostat/cryostat` -- `helm install cryostat oci://ghcr.io/cryostatio/cryostat-helm --version $VERSION` -- `git clone https://github.com/cryostatio/cryostat-helm ; cd cryostat-helm ; helm install cryostat ./charts/cryostat` -- `helm repo add openshift-helm-charts https://charts.openshift.io ; helm search repo cryostat ; helm install cryostat openshift-helm-charts/redhat-cryostat` +A Helm chart for deploying [Cryostat](https://cryostat.io/) on Kubernetes and OpenShift. + +## Requirements + +Kubernetes: `>= 1.25.0-0` + +## Installation + +### From Helm repository + +The chart is available at the following repositories: + +- https://cryostat.io/helm-charts +- https://charts.openshift.io + +To install the chart, add the repository and install, for example: + +```bash +helm repo add cryostat-charts https://cryostat.io/helm-charts +helm repo update +helm install cryostat cryostat-charts/cryostat +``` + +### From OCI container registry + +The chart is also available as an OCI image on GitHub Container Registry (`ghcr.io`). + +To install the chart, run: + +```bash +helm install cryostat oci://ghcr.io/cryostatio/cryostat-helm --version $VERSION +``` + +### From source code + +To install the chart from source code, run: + +```bash +git clone https://github.com/cryostatio/cryostat-helm +cd cryostat-helm +helm install cryostat ./charts/cryostat +``` ## Parameters From 38456835e651601b40e4b71fbd3ea16eca788274 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Wed, 17 Jul 2024 18:23:58 -0700 Subject: [PATCH 02/12] ci: clean up ci names and split chart lint & test --- .github/workflows/chart-test.yml | 65 ++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 35 +---------------- .github/workflows/submodule.yml | 2 +- .github/workflows/unittest.yml | 2 +- 4 files changed, 68 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/chart-test.yml diff --git a/.github/workflows/chart-test.yml b/.github/workflows/chart-test.yml new file mode 100644 index 00000000..8f4a7233 --- /dev/null +++ b/.github/workflows/chart-test.yml @@ -0,0 +1,65 @@ +name: Test Helm Chart + +concurrency: + group: ci-${{ github.run_id }} + cancel-in-progress: true + +on: + push: + branches: + - main + - v[0-9]+ + - v[0-9]+.[0-9]+ + - cryostat-v[0-9]+.[0-9]+ + + pull_request: + types: + - opened + - reopened + - synchronize + - labeled + - unlabeled + branches: + - main + - v[0-9]+ + - v[0-9]+.[0-9]+ + - cryostat-v[0-9]+.[0-9]+ + +env: + TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }} + TEST_NAMESPACE: helm-test + +jobs: + test-chart: + runs-on: ubuntu-latest + steps: + - name: Fail if safe-to-test label NOT applied + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'safe-to-test') }} + run: exit 1 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Helm + uses: azure/setup-helm@v4 + with: + version: v3.14.4 + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + check-latest: true + - uses: helm/chart-testing-action@v2.6.1 + - name: Set up Kind cluster + uses: helm/kind-action@v1 + with: + cluster_name: ci-${{ github.run_id }} + - name: Install and test chart + run: | + # FIXME: Remove when chart-testing fixes the issue https://github.com/helm/chart-testing/issues/525 + + HELM_LOCATION="$(which helm)" + sudo mv $HELM_LOCATION "$(dirname $HELM_LOCATION)/.helm" + cat <(echo '#!/usr/bin/env bash') <(echo 'exec .helm "${@//--reuse-values/--reset-then-reuse-values}"') | sudo tee $HELM_LOCATION + sudo chmod +x $HELM_LOCATION + + kubectl create ns $TEST_NAMESPACE + ct install --target-branch ${TARGET_BRANCH} --upgrade --namespace=$TEST_NAMESPACE --config ct.yaml --debug diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2986688d..732d16ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Lint Helm Chart concurrency: group: ci-${{ github.run_id }} @@ -48,36 +48,3 @@ jobs: uses: helm/chart-testing-action@v2.6.1 - name: Lint chart run: ct lint --target-branch ${TARGET_BRANCH} --lint-conf lintconf.yaml --config ct.yaml --chart-yaml-schema chart_schema.yaml - test-chart: - runs-on: ubuntu-latest - steps: - - name: Fail if safe-to-test label NOT applied - if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'safe-to-test') }} - run: exit 1 - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Helm - uses: azure/setup-helm@v4 - with: - version: v3.14.4 - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - check-latest: true - - uses: helm/chart-testing-action@v2.6.1 - - name: Set up Kind cluster - uses: helm/kind-action@v1 - with: - cluster_name: ci-${{ github.run_id }} - - name: Install and test chart - run: | - # FIXME: Remove when chart-testing fixes the issue https://github.com/helm/chart-testing/issues/525 - - HELM_LOCATION="$(which helm)" - sudo mv $HELM_LOCATION "$(dirname $HELM_LOCATION)/.helm" - cat <(echo '#!/usr/bin/env bash') <(echo 'exec .helm "${@//--reuse-values/--reset-then-reuse-values}"') | sudo tee $HELM_LOCATION - sudo chmod +x $HELM_LOCATION - - kubectl create ns $TEST_NAMESPACE - ct install --target-branch ${TARGET_BRANCH} --upgrade --namespace=$TEST_NAMESPACE --config ct.yaml --debug diff --git a/.github/workflows/submodule.yml b/.github/workflows/submodule.yml index 64a45dbd..b5fbd80b 100644 --- a/.github/workflows/submodule.yml +++ b/.github/workflows/submodule.yml @@ -1,4 +1,4 @@ -name: submodule +name: Update Submodule on: workflow_call: diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index b89d990f..def3d865 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -1,4 +1,4 @@ -name: Helm unit tests +name: Helm Unit Tests on: push: From 2bdd98e9d044d55861cfc9993bd748600a62b253 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Wed, 17 Jul 2024 18:41:52 -0700 Subject: [PATCH 03/12] ci: add steps to check readme diff --- .github/workflows/chart-test.yml | 7 +++---- .github/workflows/ci.yml | 26 +++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/chart-test.yml b/.github/workflows/chart-test.yml index 8f4a7233..1552d3b6 100644 --- a/.github/workflows/chart-test.yml +++ b/.github/workflows/chart-test.yml @@ -25,13 +25,12 @@ on: - v[0-9]+.[0-9]+ - cryostat-v[0-9]+.[0-9]+ -env: - TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }} - TEST_NAMESPACE: helm-test - jobs: test-chart: runs-on: ubuntu-latest + env: + TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }} + TEST_NAMESPACE: helm-test steps: - name: Fail if safe-to-test label NOT applied if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'safe-to-test') }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 732d16ec..6ba7198a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,13 +25,14 @@ on: - v[0-9]+.[0-9]+ - cryostat-v[0-9]+.[0-9]+ -env: - TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }} - TEST_NAMESPACE: helm-test + jobs: lint-chart: runs-on: ubuntu-latest + env: + TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }} + TEST_NAMESPACE: helm-test steps: - uses: actions/checkout@v4 with: @@ -48,3 +49,22 @@ jobs: uses: helm/chart-testing-action@v2.6.1 - name: Lint chart run: ct lint --target-branch ${TARGET_BRANCH} --lint-conf lintconf.yaml --config ct.yaml --chart-yaml-schema chart_schema.yaml + check-readme-diff: + runs-on: ubuntu-latest + env: + README_GENERATOR_VERSION: 2.5.2 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Check README diff + run: | + npx @bitnami/readme-generator-for-helm@{{ env.README_GENERATOR_VERSION }} \ + --values charts/cryostat/values.yaml \ + --readme charts/cryostat/README.md \ + --schema charts/cryostat/values.schema.json + + if ! git diff --exit-code; then + echo "README requires updating. To update, run:" + echo "npx @bitnami/readme-generator-for-helm@{{ env.README_GENERATOR_VERSION }} --values charts/cryostat/values.yaml --readme charts/cryostat/README.md --schema charts/cryostat/values.schema.json" + fi From 035f49680f3175b8f1af112a35c257f278f05c65 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Wed, 17 Jul 2024 18:54:08 -0700 Subject: [PATCH 04/12] fix: correct use of env var --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ba7198a..b03f6b79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: fetch-depth: 0 - name: Check README diff run: | - npx @bitnami/readme-generator-for-helm@{{ env.README_GENERATOR_VERSION }} \ + npx @bitnami/readme-generator-for-helm@$README_GENERATOR_VERSION \ --values charts/cryostat/values.yaml \ --readme charts/cryostat/README.md \ --schema charts/cryostat/values.schema.json From cb738255a6f5aaac3f1e2ab3dcd91589f3a65ce7 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Wed, 17 Jul 2024 18:54:35 -0700 Subject: [PATCH 05/12] fixup: correct use of env var --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b03f6b79..d5544dda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,5 +66,5 @@ jobs: if ! git diff --exit-code; then echo "README requires updating. To update, run:" - echo "npx @bitnami/readme-generator-for-helm@{{ env.README_GENERATOR_VERSION }} --values charts/cryostat/values.yaml --readme charts/cryostat/README.md --schema charts/cryostat/values.schema.json" + echo "npx @bitnami/readme-generator-for-helm@$README_GENERATOR_VERSION --values charts/cryostat/values.yaml --readme charts/cryostat/README.md --schema charts/cryostat/values.schema.json" fi From ffc23d066dc9b8d46a11f96ad1928e8dca2cc720 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Wed, 17 Jul 2024 18:58:19 -0700 Subject: [PATCH 06/12] ci: combine test jobs into a single workflow --- .github/workflows/chart-test.yml | 20 +++++++++++++++- .github/workflows/unittest.yml | 41 -------------------------------- 2 files changed, 19 insertions(+), 42 deletions(-) delete mode 100644 .github/workflows/unittest.yml diff --git a/.github/workflows/chart-test.yml b/.github/workflows/chart-test.yml index 1552d3b6..36140df8 100644 --- a/.github/workflows/chart-test.yml +++ b/.github/workflows/chart-test.yml @@ -26,7 +26,7 @@ on: - cryostat-v[0-9]+.[0-9]+ jobs: - test-chart: + helm-test: runs-on: ubuntu-latest env: TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }} @@ -62,3 +62,21 @@ jobs: kubectl create ns $TEST_NAMESPACE ct install --target-branch ${TARGET_BRANCH} --upgrade --namespace=$TEST_NAMESPACE --config ct.yaml --debug + + helm-unittests: + runs-on: ubuntu-latest + steps: + - name: fail if safe-to-test label NOT applied + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'safe-to-test') }} + run: exit 1 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Helm + uses: azure/setup-helm@v4 + with: + version: v3.14.4 + - name: Install unit test plugin + run: helm plugin install https://github.com/helm-unittest/helm-unittest.git --version v0.5.1 + - name: Run Helm unit tests + run: helm unittest --debug ./charts/cryostat diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml deleted file mode 100644 index def3d865..00000000 --- a/.github/workflows/unittest.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Helm Unit Tests - -on: - push: - branches: - - main - - v[0-9]+ - - v[0-9]+.[0-9]+ - - cryostat-v[0-9]+.[0-9]+ - - pull_request: - types: - - opened - - reopened - - synchronize - - labeled - - unlabeled - branches: - - main - - v[0-9]+ - - v[0-9]+.[0-9]+ - - cryostat-v[0-9]+.[0-9]+ - -jobs: - helm-unittests: - runs-on: ubuntu-latest - steps: - - name: fail if safe-to-test label NOT applied - if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'safe-to-test') }} - run: exit 1 - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Helm - uses: azure/setup-helm@v4 - with: - version: v3.14.4 - - name: Install unit test plugin - run: helm plugin install https://github.com/helm-unittest/helm-unittest.git --version v0.5.1 - - name: Run Helm unit tests - run: helm unittest --debug ./charts/cryostat From eb5a8d7d95abca65ab5161af36f7e8cabeffc10d Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Wed, 17 Jul 2024 19:04:05 -0700 Subject: [PATCH 07/12] chore: rename workflow file --- .github/workflows/{ci.yml => chart-lint.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ci.yml => chart-lint.yml} (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/chart-lint.yml similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/chart-lint.yml From 5dd0089f61c1cbd1615d8ac2b05afbb4cb5a5073 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Wed, 17 Jul 2024 19:06:19 -0700 Subject: [PATCH 08/12] chore: use singular --- .github/workflows/chart-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/chart-test.yml b/.github/workflows/chart-test.yml index 36140df8..a270a0df 100644 --- a/.github/workflows/chart-test.yml +++ b/.github/workflows/chart-test.yml @@ -63,7 +63,7 @@ jobs: kubectl create ns $TEST_NAMESPACE ct install --target-branch ${TARGET_BRANCH} --upgrade --namespace=$TEST_NAMESPACE --config ct.yaml --debug - helm-unittests: + helm-unittest: runs-on: ubuntu-latest steps: - name: fail if safe-to-test label NOT applied From 0e0f178eb8a5da7c70a3fb7349c10acdb26b4c72 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Wed, 17 Jul 2024 20:31:37 -0700 Subject: [PATCH 09/12] chore: format workflow files --- .github/workflows/chart-lint.yml | 7 ++-- .github/workflows/chart-test.yml | 58 ++++++++++++++++---------------- .github/workflows/submodule.yml | 46 ++++++++++++------------- 3 files changed, 55 insertions(+), 56 deletions(-) diff --git a/.github/workflows/chart-lint.yml b/.github/workflows/chart-lint.yml index d5544dda..9b72aa4a 100644 --- a/.github/workflows/chart-lint.yml +++ b/.github/workflows/chart-lint.yml @@ -25,8 +25,6 @@ on: - v[0-9]+.[0-9]+ - cryostat-v[0-9]+.[0-9]+ - - jobs: lint-chart: runs-on: ubuntu-latest @@ -43,12 +41,13 @@ jobs: version: v3.14.4 - uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: "3.x" check-latest: true - name: Set up chart-testing uses: helm/chart-testing-action@v2.6.1 - name: Lint chart run: ct lint --target-branch ${TARGET_BRANCH} --lint-conf lintconf.yaml --config ct.yaml --chart-yaml-schema chart_schema.yaml + check-readme-diff: runs-on: ubuntu-latest env: @@ -63,7 +62,7 @@ jobs: --values charts/cryostat/values.yaml \ --readme charts/cryostat/README.md \ --schema charts/cryostat/values.schema.json - + if ! git diff --exit-code; then echo "README requires updating. To update, run:" echo "npx @bitnami/readme-generator-for-helm@$README_GENERATOR_VERSION --values charts/cryostat/values.yaml --readme charts/cryostat/README.md --schema charts/cryostat/values.schema.json" diff --git a/.github/workflows/chart-test.yml b/.github/workflows/chart-test.yml index a270a0df..fa699502 100644 --- a/.github/workflows/chart-test.yml +++ b/.github/workflows/chart-test.yml @@ -32,36 +32,36 @@ jobs: TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }} TEST_NAMESPACE: helm-test steps: - - name: Fail if safe-to-test label NOT applied - if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'safe-to-test') }} - run: exit 1 - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Helm - uses: azure/setup-helm@v4 - with: - version: v3.14.4 - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - check-latest: true - - uses: helm/chart-testing-action@v2.6.1 - - name: Set up Kind cluster - uses: helm/kind-action@v1 - with: - cluster_name: ci-${{ github.run_id }} - - name: Install and test chart - run: | - # FIXME: Remove when chart-testing fixes the issue https://github.com/helm/chart-testing/issues/525 - - HELM_LOCATION="$(which helm)" - sudo mv $HELM_LOCATION "$(dirname $HELM_LOCATION)/.helm" - cat <(echo '#!/usr/bin/env bash') <(echo 'exec .helm "${@//--reuse-values/--reset-then-reuse-values}"') | sudo tee $HELM_LOCATION - sudo chmod +x $HELM_LOCATION + - name: Fail if safe-to-test label NOT applied + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'safe-to-test') }} + run: exit 1 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Helm + uses: azure/setup-helm@v4 + with: + version: v3.14.4 + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + check-latest: true + - uses: helm/chart-testing-action@v2.6.1 + - name: Set up Kind cluster + uses: helm/kind-action@v1 + with: + cluster_name: ci-${{ github.run_id }} + - name: Install and test chart + run: | + # FIXME: Remove when chart-testing fixes the issue https://github.com/helm/chart-testing/issues/525 + + HELM_LOCATION="$(which helm)" + sudo mv $HELM_LOCATION "$(dirname $HELM_LOCATION)/.helm" + cat <(echo '#!/usr/bin/env bash') <(echo 'exec .helm "${@//--reuse-values/--reset-then-reuse-values}"') | sudo tee $HELM_LOCATION + sudo chmod +x $HELM_LOCATION - kubectl create ns $TEST_NAMESPACE - ct install --target-branch ${TARGET_BRANCH} --upgrade --namespace=$TEST_NAMESPACE --config ct.yaml --debug + kubectl create ns $TEST_NAMESPACE + ct install --target-branch ${TARGET_BRANCH} --upgrade --namespace=$TEST_NAMESPACE --config ct.yaml --debug helm-unittest: runs-on: ubuntu-latest diff --git a/.github/workflows/submodule.yml b/.github/workflows/submodule.yml index b5fbd80b..71018628 100644 --- a/.github/workflows/submodule.yml +++ b/.github/workflows/submodule.yml @@ -19,26 +19,26 @@ jobs: if: ${{ github.repository_owner == 'cryostatio' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - repository: cryostatio/cryostatio.github.io - token: "${{ secrets.SUBMODULE_TOKEN }}" - - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v6 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - git_user_signingkey: true - git_commit_gpgsign: true - - name: Update submodule to latest commit - run: | - git submodule update --init - git submodule update --remote - - name: Commit and push submodule - run: | - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config user.name "github-actions[bot]" - git add --all - git_hash="$(git rev-parse --short :helm-charts)" - git commit -S -m "build(helm-charts): update submodule to $git_hash" || echo "No changes to commit" - git push + - uses: actions/checkout@v4 + with: + repository: cryostatio/cryostatio.github.io + token: "${{ secrets.SUBMODULE_TOKEN }}" + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + git_user_signingkey: true + git_commit_gpgsign: true + - name: Update submodule to latest commit + run: | + git submodule update --init + git submodule update --remote + - name: Commit and push submodule + run: | + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config user.name "github-actions[bot]" + git add --all + git_hash="$(git rev-parse --short :helm-charts)" + git commit -S -m "build(helm-charts): update submodule to $git_hash" || echo "No changes to commit" + git push From c72cb547feddb0a90090c4aecde9af591c608432 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Thu, 18 Jul 2024 00:57:33 -0700 Subject: [PATCH 10/12] ci: should fail when readme is outdated --- .github/workflows/chart-lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/chart-lint.yml b/.github/workflows/chart-lint.yml index 9b72aa4a..b0cf4146 100644 --- a/.github/workflows/chart-lint.yml +++ b/.github/workflows/chart-lint.yml @@ -66,4 +66,5 @@ jobs: if ! git diff --exit-code; then echo "README requires updating. To update, run:" echo "npx @bitnami/readme-generator-for-helm@$README_GENERATOR_VERSION --values charts/cryostat/values.yaml --readme charts/cryostat/README.md --schema charts/cryostat/values.schema.json" + exit 1 fi From 49837c602659b1d9ed6a48aa3de4cf95c618f0dd Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Thu, 18 Jul 2024 11:10:05 -0700 Subject: [PATCH 11/12] chore: remove unused env var --- .github/workflows/chart-lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/chart-lint.yml b/.github/workflows/chart-lint.yml index b0cf4146..eaebe99b 100644 --- a/.github/workflows/chart-lint.yml +++ b/.github/workflows/chart-lint.yml @@ -30,7 +30,6 @@ jobs: runs-on: ubuntu-latest env: TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }} - TEST_NAMESPACE: helm-test steps: - uses: actions/checkout@v4 with: From 8bbcce04f8eb2ed2cd88778461fef80ca61fe191 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Thu, 18 Jul 2024 11:12:05 -0700 Subject: [PATCH 12/12] feat: add concurrency config to oci-push --- .github/workflows/push-oci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/push-oci.yml b/.github/workflows/push-oci.yml index e16ab4da..dc7927b8 100644 --- a/.github/workflows/push-oci.yml +++ b/.github/workflows/push-oci.yml @@ -1,5 +1,9 @@ name: Push Helm Chart to OCI Registry +concurrency: + group: ci-${{ github.run_id }} + cancel-in-progress: true + on: push: branches: