From f2d2726fe00f72c4ad1c1206da65447f091f034f Mon Sep 17 00:00:00 2001 From: Dread Date: Fri, 3 Jul 2026 09:48:52 -0400 Subject: [PATCH] ci: auto-bump flash chart patch version on image bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The image-bump pipeline set the image digests and appVersion in the flash chart but left Chart.yaml `version` unchanged — a manual edit every deploy. That version is load-bearing: package-releases.sh publishes with `helm push ... | grep -v "already exists"`, so an unchanged version makes the push silently no-op and the OCI registry keeps the stale chart; a `make flash ENV=` apply (terraform helm_release pinned to that version) then re-pulls the old image. Increment the chart's semver patch alongside the digest/appVersion bump so every image bump produces a distinct, publishable, deployable chart version. Piece 1 of 3 toward a one-step deploy (this repo). Companion charts-repo work publishes the new version to OCI on merge and syncs the terraform version pin in deployments. Co-Authored-By: Claude Opus 4.8 (1M context) --- ci/tasks/bump-image-digest.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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})" )