Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion ci/tasks/bump-image-digest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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})"
)
Loading