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"