fix(image-builder): add --no-cache option to docker buildx command for fresh builds

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-04-14 16:21:15 +08:00
parent e37c078a90
commit f55c8f0e89

View File

@ -119,7 +119,7 @@ class ImageBuilder {
steps.env.BUILDKIT_PROGRESS = "plain" steps.env.BUILDKIT_PROGRESS = "plain"
steps.log.info("ImageBuilder", "Set builder timeout to 10min...") steps.log.info("ImageBuilder", "Set builder timeout to 10min...")
steps.env.BUILDKIT_TIMEOUT = "1800s" steps.env.BUILDKIT_TIMEOUT = "1800s"
steps.sh "docker buildx build --builder ${buildxBuilderName} --platform ${architectures.join(",")} -t ${registry}/${repository}/${name}:${version} -f ${dockerfile} --push ${contextRoot}" steps.sh "docker buildx build --builder ${buildxBuilderName} --no-cache --platform ${architectures.join(",")} -t ${registry}/${repository}/${name}:${version} -f ${dockerfile} --push ${contextRoot}"
steps.env.BUILD_IMAGE_REGISTRY = "${registry}" steps.env.BUILD_IMAGE_REGISTRY = "${registry}"
steps.env.BUILD_IMAGE_REPO = "${repository}" steps.env.BUILD_IMAGE_REPO = "${repository}"
steps.env.BUILD_IMAGE_NAME = "${name}" steps.env.BUILD_IMAGE_NAME = "${name}"