From 5a8c55a471c133e8ef87ac9eb448f03bc7c18cbb Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 20 Jul 2026 01:28:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8Ddeploy=E8=84=9A?= =?UTF-8?q?=E6=9C=ACretry=5Fdocker=5Flogin=E5=BC=95=E5=8F=B7=E5=B5=8C?= =?UTF-8?q?=E5=A5=97=E9=97=AE=E9=A2=98=20(#593)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/ci_production_deploy.sh | 3 ++- scripts/ci_staging_deploy.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/ci_production_deploy.sh b/scripts/ci_production_deploy.sh index b41c2143e..8a24aaabd 100644 --- a/scripts/ci_production_deploy.sh +++ b/scripts/ci_production_deploy.sh @@ -37,7 +37,8 @@ retry_cmd() { retry_docker_login() { echo "Logging in to registry (up to 3 retries)" - if retry_cmd 3 5 sh -c "printf %s "$REGISTRY_TOKEN" | docker login "$REGISTRY_HOST" -u "$REGISTRY_USER" --password-stdin"; then + export REGISTRY_TOKEN REGISTRY_HOST REGISTRY_USER + if retry_cmd 3 5 sh -c 'printf "%s" "$REGISTRY_TOKEN" | docker login "$REGISTRY_HOST" -u "$REGISTRY_USER" --password-stdin'; then return 0 fi echo "WARN: docker login failed after retries, will try pull anyway" diff --git a/scripts/ci_staging_deploy.sh b/scripts/ci_staging_deploy.sh index abe59864a..80a0337b4 100755 --- a/scripts/ci_staging_deploy.sh +++ b/scripts/ci_staging_deploy.sh @@ -37,7 +37,8 @@ retry_cmd() { retry_docker_login() { echo "Logging in to registry (up to 3 retries)" - if retry_cmd 3 5 sh -c "printf %s "$REGISTRY_TOKEN" | docker login "$REGISTRY_HOST" -u "$REGISTRY_USER" --password-stdin"; then + export REGISTRY_TOKEN REGISTRY_HOST REGISTRY_USER + if retry_cmd 3 5 sh -c 'printf "%s" "$REGISTRY_TOKEN" | docker login "$REGISTRY_HOST" -u "$REGISTRY_USER" --password-stdin'; then return 0 fi echo "WARN: docker login failed after retries, will try pull anyway" -- 2.54.0