This commit is contained in:
2026-08-24 17:15:48 +08:00
parent 132d96a99b
commit 3d8a1fac20
45 changed files with 1250 additions and 35 deletions
+10
View File
@@ -246,6 +246,11 @@ deploy_local() {
new_started=false
fi
if [ "$new_started" = "true" ] && wait_for_local_health; then
running_image="$(local_container_image || true)"
if [ "$running_image" != "$IMAGE" ]; then
echo "运行容器镜像与请求镜像不一致: expected=$IMAGE actual=${running_image:-missing}" >&2
return 1
fi
echo "新镜像健康检查通过: $IMAGE"
local_compose ps "$SERVICE"
local_registry_logout
@@ -441,6 +446,11 @@ if ! compose up -d --no-deps --pull never "$service"; then
new_started=false
fi
if [ "$new_started" = "true" ] && wait_for_health; then
running_image="$(container_image || true)"
if [ "$running_image" != "$new_image" ]; then
echo "运行容器镜像与请求镜像不一致: expected=$new_image actual=${running_image:-missing}" >&2
exit 1
fi
echo "新镜像健康检查通过: $new_image"
compose ps "$service"
exit 0