From f04038f955c28df216cd7989dab07c23cce99077 Mon Sep 17 00:00:00 2001 From: XiaoXia Bot Date: Wed, 15 Jul 2026 21:24:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=B8=B4=E6=97=B6=E7=A6=81=E7=94=A8?= =?UTF-8?q?registry=20cache-to=EF=BC=8CACR=E6=8E=A8=E9=80=81=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E5=A4=AA=E6=85=A2=E5=AF=BC=E8=87=B4=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E8=B6=85=E6=97=B6\n\nStep=202=E7=9A=84registry=20cache=20sync?= =?UTF-8?q?=E5=9C=A8=E9=A6=96=E6=AC=A1=E5=85=A8=E9=87=8F=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=97=B6=E6=9E=81=E6=85=A2=EF=BC=88API=2011min+=20/=20Worker?= =?UTF-8?q?=2013min+=EF=BC=89\n=E5=85=88=E6=B3=A8=E9=87=8A=E6=8E=89?= =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E5=85=A8=E9=93=BE=E8=B7=AF=E8=B7=91=E9=80=9A?= =?UTF-8?q?=EF=BC=8C=E7=BC=93=E5=AD=98=E4=BC=98=E5=8C=96=E5=90=8E=E7=BB=AD?= =?UTF-8?q?=E5=86=8D=E8=B0=83\n\n=E4=BF=9D=E7=95=99cache-from=20registry?= =?UTF-8?q?=EF=BC=88=E8=AF=BB=E7=BC=93=E5=AD=98=EF=BC=89=EF=BC=8C=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E7=BC=93=E5=AD=98=E8=AF=BB=E5=86=99=E6=AD=A3=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/ci/docker_build_push.sh | 64 ++++++++++++++++----------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/scripts/ci/docker_build_push.sh b/scripts/ci/docker_build_push.sh index d032991f2..dc73eb1d7 100755 --- a/scripts/ci/docker_build_push.sh +++ b/scripts/ci/docker_build_push.sh @@ -54,38 +54,38 @@ echo "" echo "Image pushed: ${IMAGE_TAG}" echo "Local cache updated" -echo "" -echo "=== Step 2: Sync registry cache (best effort, retries 3x) ===" -CACHE_TO_REGISTRY="type=registry,ref=${CACHE_REF},mode=max,compression=zstd" - -MAX_RETRIES=3 -SUCCESS=0 -for attempt in $(seq 1 $MAX_RETRIES); do - echo "Registry cache sync attempt $attempt/$MAX_RETRIES" - if docker buildx build \ - $BUILD_ARGS \ - --cache-from "${CACHE_FROM_LOCAL}" \ - --cache-to "${CACHE_TO_REGISTRY}" \ - -f "${DOCKERFILE}" \ - -t "${IMAGE_TAG}" \ - --push \ - .; then - echo "Registry cache synced (attempt $attempt)" - SUCCESS=1 - break - else - echo "Registry cache sync failed (attempt $attempt)" - if [ $attempt -lt $MAX_RETRIES ]; then - WAIT=$((attempt * 5)) - echo "Retrying in ${WAIT}s..." - sleep $WAIT - fi - fi -done - -if [ $SUCCESS -eq 0 ]; then - echo "WARNING: Registry cache sync failed after $MAX_RETRIES attempts (non-fatal, local cache still works)" -fi +# DISABLED: registry cache too slow echo "" +# DISABLED: registry cache too slow echo "=== Step 2: Sync registry cache (best effort, retries 3x) ===" +# DISABLED: registry cache too slow CACHE_TO_REGISTRY="type=registry,ref=${CACHE_REF},mode=max,compression=zstd" +# DISABLED: registry cache too slow +# DISABLED: registry cache too slow MAX_RETRIES=3 +# DISABLED: registry cache too slow SUCCESS=0 +# DISABLED: registry cache too slow for attempt in $(seq 1 $MAX_RETRIES); do +# DISABLED: registry cache too slow echo "Registry cache sync attempt $attempt/$MAX_RETRIES" +# DISABLED: registry cache too slow if docker buildx build \ +# DISABLED: registry cache too slow $BUILD_ARGS \ +# DISABLED: registry cache too slow --cache-from "${CACHE_FROM_LOCAL}" \ +# DISABLED: registry cache too slow --cache-to "${CACHE_TO_REGISTRY}" \ +# DISABLED: registry cache too slow -f "${DOCKERFILE}" \ +# DISABLED: registry cache too slow -t "${IMAGE_TAG}" \ +# DISABLED: registry cache too slow --push \ +# DISABLED: registry cache too slow .; then +# DISABLED: registry cache too slow echo "Registry cache synced (attempt $attempt)" +# DISABLED: registry cache too slow SUCCESS=1 +# DISABLED: registry cache too slow break +# DISABLED: registry cache too slow else +# DISABLED: registry cache too slow echo "Registry cache sync failed (attempt $attempt)" +# DISABLED: registry cache too slow if [ $attempt -lt $MAX_RETRIES ]; then +# DISABLED: registry cache too slow WAIT=$((attempt * 5)) +# DISABLED: registry cache too slow echo "Retrying in ${WAIT}s..." +# DISABLED: registry cache too slow sleep $WAIT +# DISABLED: registry cache too slow fi +# DISABLED: registry cache too slow fi +# DISABLED: registry cache too slow done +# DISABLED: registry cache too slow +# DISABLED: registry cache too slow if [ $SUCCESS -eq 0 ]; then +# DISABLED: registry cache too slow echo "WARNING: Registry cache sync failed after $MAX_RETRIES attempts (non-fatal, local cache still works)" +# DISABLED: registry cache too slow fi echo "" echo "Build completed: ${IMAGE_TAG}" -- 2.54.0