From bc000d7979e69b712243b314ad44b5e2c12cc38f Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Thu, 14 Sep 2023 17:44:22 -0600 Subject: [PATCH] cloudbuild: push images straight from docker build Using `docker buildx build --load ...` with multi arch builds returns the below error: > error: docker exporter does not currently support exporting manifest lists Use --push instead to push images directy from the docker build. This makes the `images` cloudbuild step unnecessary. Signed-off-by: Blaine Gardner --- cloudbuild.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index aa9e89d..6c25e05 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -28,7 +28,7 @@ steps: args: - buildx - build - - --load # https://docs.docker.com/build/drivers/docker-container/#loading-to-local-image-store + - --push # --load doesn't work with multi-platform builds, so just push from docker build - --platform=${_PLATFORMS} - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_GIT_TAG} # using _PULL_BASE_REF as a tag will often just build and overwrite the same 'master' tag, @@ -37,7 +37,3 @@ steps: - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_PULL_BASE_REF} - --tag=gcr.io/k8s-staging-sig-storage/${_IMAGE}:latest - . -images: - - gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_GIT_TAG} - - gcr.io/k8s-staging-sig-storage/${_IMAGE}:${_PULL_BASE_REF} - - gcr.io/k8s-staging-sig-storage/${_IMAGE}:latest