From 340a54623befadc8ba4eeb569d34157fd2a3c9da Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Thu, 14 May 2026 15:37:19 +0800 Subject: [PATCH] fix: add --platform to docker pull and handle pull failure --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f70b4cb..c931e72 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,7 +30,7 @@ pipeline { def imageName = "${ACR_REGISTRY}/${ACR_NAMESPACE}/${params.SERVICE}:${params.IMAGE_TAG}" bat """ docker login ${ACR_REGISTRY} -u ${ACR_USERNAME} -p %ACR_PASS% - docker pull ${imageName} || exit 0 + docker pull --platform=linux/amd64 ${imageName} || echo Pull failed, will build fresh docker build --platform=linux/amd64 --build-arg SERVICE_MODULE=${params.SERVICE} --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from ${imageName} -t ${imageName} . docker push ${imageName} docker rmi ${imageName} || exit 0