优化
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user