From 72eb60f8ca4daa1ddd392335eb3c2391e867ae10 Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Thu, 11 Jun 2026 15:20:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8D=20bat=20=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86=EF=BC=8CDocker=20?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=97=B6=E7=AB=8B=E5=8D=B3=E9=80=80=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- Jenkinsfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 86874c7..15413a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -106,15 +106,14 @@ pipeline { bat """ docker login ${ACR_REGISTRY} -u ${ACR_USERNAME} -p %ACR_PASS% + if %errorlevel% neq 0 exit /b 1 docker pull --platform=linux/amd64 ${imageName} || echo Pull failed, will build fresh - docker build --platform=linux/amd64 \ - --build-arg SERVICE_MODULE=${svc} \ - --build-arg SERVICE_VERSION=${env.SERVICE_VERSION} \ - --build-arg BUILDKIT_INLINE_CACHE=1 \ - --cache-from ${imageName} \ - -t ${imageName} . + docker build --platform=linux/amd64 --build-arg SERVICE_MODULE=${svc} --build-arg SERVICE_VERSION=${env.SERVICE_VERSION} --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from ${imageName} -t ${imageName} . + if %errorlevel% neq 0 exit /b 1 docker push ${imageName} - docker rmi ${imageName} || exit 0 + if %errorlevel% neq 0 exit /b 1 + docker rmi ${imageName} + exit /b 0 """ } }