fix: add --platform to docker pull and handle pull failure
这个提交包含在:
父节点
dd63093a85
当前提交
1552bfb561
@ -33,7 +33,7 @@ pipeline {
|
||||
def fullImage = "${env.ACR_REGISTRY}/${env.ACR_NAMESPACE}/${env.IMAGE_NAME}:${params.IMAGE_TAG}"
|
||||
bat """
|
||||
docker login ${env.ACR_REGISTRY} -u ${env.ACR_USERNAME} -p %ACR_PASS%
|
||||
docker pull ${fullImage} || exit 0
|
||||
docker pull --platform=linux/amd64 ${fullImage} || echo Pull failed, will build fresh
|
||||
docker build --platform=linux/amd64 -f ${env.DOCKERFILE} ${env.BUILD_ARGS} --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from ${fullImage} -t ${fullImage} .
|
||||
docker push ${fullImage}
|
||||
docker rmi ${fullImage} || exit 0
|
||||
|
||||
@ -33,7 +33,7 @@ pipeline {
|
||||
def fullImage = "${env.ACR_REGISTRY}/${env.ACR_NAMESPACE}/${env.IMAGE_NAME}:${params.IMAGE_TAG}"
|
||||
bat """
|
||||
docker login ${env.ACR_REGISTRY} -u ${env.ACR_USERNAME} -p %ACR_PASS%
|
||||
docker pull ${fullImage} || exit 0
|
||||
docker pull --platform=linux/amd64 ${fullImage} || echo Pull failed, will build fresh
|
||||
docker build --platform=linux/amd64 -f ${env.DOCKERFILE} ${env.BUILD_ARGS} --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from ${fullImage} -t ${fullImage} .
|
||||
docker push ${fullImage}
|
||||
docker rmi ${fullImage} || exit 0
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户