diff --git a/ci/tasks/bump-image-digest.sh b/ci/tasks/bump-image-digest.sh index a2d1f7ee5..48a3d3b45 100755 --- a/ci/tasks/bump-image-digest.sh +++ b/ci/tasks/bump-image-digest.sh @@ -19,6 +19,16 @@ yq -i e '.galoy.images.mongodbMigrate.digest = strenv(migrate_digest)' ./charts/ yq -i e '.galoy.images.websocket.digest = strenv(websocket_digest)' ./charts/flash/values.yaml yq -i e '.appVersion = strenv(app_version)' ./charts/flash/Chart.yaml +# Bump the chart's own semver patch on every image bump. This is load-bearing +# for the deploy: package-releases.sh publishes with `helm push ... | grep -v +# "already exists"`, so if `version` is unchanged the push silently no-ops and +# the OCI registry keeps the stale chart — a terraform apply then re-pulls the +# old image. A fresh patch version means every image bump is a distinct, +# publishable, deployable chart. Was previously a manual edit. +export chart_version=$(yq e '.version' ./charts/flash/Chart.yaml) +export new_chart_version=$(echo "${chart_version}" | awk -F. '{ printf "%d.%d.%d", $1, $2, $3 + 1 }') +yq -i e '.version = strenv(new_chart_version)' ./charts/flash/Chart.yaml + if [[ -z $(git config --global user.email) ]]; then git config --global user.email "bot@flash.io" fi @@ -31,5 +41,5 @@ fi git merge --no-edit ${BRANCH} git add -A git status - git commit -m "chore(deps): bump flash image to '${digest}'" + git commit -m "chore(deps): bump flash image to '${digest}' (chart ${new_chart_version})" )