diff --git a/.github/workflows/utils/bump-chart-version.sh b/.github/workflows/utils/bump-chart-version.sh index 6a0069aef..e1fbe8122 100755 --- a/.github/workflows/utils/bump-chart-version.sh +++ b/.github/workflows/utils/bump-chart-version.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash -# Bump Helm Chart version, and appVersion to a given version number +# Bump Helm Chart version, appVersion to a given version number set -e die () { echo >&2 "$@" - echo "usage: bump.sh [chartYamlFile] [version]" + echo "usage: bump.sh [chartPath] [version]" exit 1 } @@ -17,9 +17,17 @@ fi [ "$#" -eq 2 ] || die "2 arguments required, $# provided" -chart_yaml="${1}" -version="${2}" +chart_yaml="${1}/Chart.yaml" +# Remove v prefix if provided +semVer="$(echo ${2} | sed -e 's/^v\(.*\)/\1/')" -sed -i "s#^appVersion:.*#appVersion: ${version}#g" "${chart_yaml}" -sed -i "s#^version:.*#version: ${version}#g" "${chart_yaml}" + +# AppVersion includes a v prefix +sed -i "s#^appVersion:.*#appVersion: v${semVer}#g" "${chart_yaml}" + +# Bump chart version MINOR and reset PATCH segment +# A new release means a bump in the minor segment of the Chart and a reset of the patch one +# i.e 1.0.2 => 1.1.0 +chartVersion=$(cat ${chart_yaml} | awk -F'[ .]' '/^version:/ {print $2"."$3+1"."0}') +sed -i "s#^version:.*#version: ${chartVersion}#g" "${chart_yaml}" diff --git a/deployment/chainloop/Chart.yaml b/deployment/chainloop/Chart.yaml index f0660dabc..7404d1faa 100644 --- a/deployment/chainloop/Chart.yaml +++ b/deployment/chainloop/Chart.yaml @@ -3,7 +3,7 @@ name: chainloop description: Chainloop is an open source software supply chain control plane, a single source of truth for artifacts plus a declarative attestation crafting process. type: application -version: v0.8.98-r1 +version: 1.0.2 appVersion: v0.8.98 dependencies: diff --git a/deployment/chainloop/README.md b/deployment/chainloop/README.md index 0d6a92c9f..10deb0113 100644 --- a/deployment/chainloop/README.md +++ b/deployment/chainloop/README.md @@ -18,7 +18,7 @@ This chart bootstraps a [Chainloop](https://github.com/chainloop-dev/chainloop) Deploy Chainloop in [development mode](#development) by running ```console -helm install [RELEASE_NAME] . \ +helm install [RELEASE_NAME] oci://ghcr.io/chainloop-dev/charts/chainloop \ --set development=true \ --set controlplane.auth.oidc.url=[OIDC URL] \ --set controlplane.auth.oidc.clientID=[clientID] \ @@ -61,7 +61,7 @@ openssl ec -in private.ec.key -pubout -out public.pem Deploy Chainloop configured to talk to the bundled PostgreSQL an external OIDC IDp and a Vault instance. ```console -helm install [RELEASE_NAME] . \ +helm install [RELEASE_NAME] oci://ghcr.io/chainloop-dev/charts/chainloop \ # Open ID Connect (OIDC) --set controlplane.auth.oidc.url=[OIDC URL] \ --set controlplane.auth.oidc.clientID=[clientID] \ @@ -77,7 +77,7 @@ helm install [RELEASE_NAME] . \ Deploy using AWS secret manager instead of Vault ```console -helm install [RELEASE_NAME] . \ +helm install [RELEASE_NAME] oci://ghcr.io/chainloop-dev/charts/chainloop \ # Open ID Connect (OIDC) # ... # Secrets backend @@ -91,7 +91,7 @@ helm install [RELEASE_NAME] . \ Connect to an external PostgreSQL database instead ```console -helm install [RELEASE_NAME] . \ +helm install [RELEASE_NAME] oci://ghcr.io/chainloop-dev/charts/chainloop \ # Open ID Connect (OIDC) # ... # Secrets backend @@ -132,7 +132,7 @@ During installation, you'll need to provide Deploy by leveraging built-in Vault and PostgreSQL instances ```console -helm install [RELEASE_NAME] . \ +helm install [RELEASE_NAME] oci://ghcr.io/chainloop-dev/charts/chainloop \ --set development=true \ --set controlplane.auth.oidc.url=[OIDC URL] \ --set controlplane.auth.oidc.clientID=[clientID] \