Skip to content

Commit 2847298

Browse files
Kyu-seokclaude
andauthored
ci: log why the deploy rolls replicas of unchanged code (#346)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 88d23c7 commit 2847298

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎scripts/deploy-prod.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ needs_roll() {
2727
local id old
2828
for id in "$@"; do
2929
old=$(docker inspect -f '{{.Image}} {{index .Config.Labels "com.docker.compose.config-hash"}}' "$id" 2>/dev/null) || old=""
30-
[[ $old == "$image $hash" ]] || return 0
30+
if [[ $old != "$image $hash" ]]; then
31+
# Which of the two differs, so a roll of unchanged code can be traced to its cause.
32+
echo "--- Rolling: replica $id has image/config '$old', the build has '$image $hash' ---"
33+
return 0
34+
fi
3135
done
3236
return 1
3337
}

0 commit comments

Comments
 (0)