From 0c76549b6e1b2d5cbc926c5d2a2a04aecb7d21be Mon Sep 17 00:00:00 2001 From: Chongyi Zheng Date: Sun, 7 Jul 2024 19:21:07 -0400 Subject: [PATCH] Build multi-arch docker image --- releasing/cloudbuild_kustomize_image.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/releasing/cloudbuild_kustomize_image.yaml b/releasing/cloudbuild_kustomize_image.yaml index 605b292171..18086d5b1f 100644 --- a/releasing/cloudbuild_kustomize_image.yaml +++ b/releasing/cloudbuild_kustomize_image.yaml @@ -9,14 +9,25 @@ steps: - "PROJECT_ID=$PROJECT_ID" - "_GIT_TAG=$_GIT_TAG" - "_PULL_BASE_REF=$_PULL_BASE_REF" -# We need to use bash to configure the build date and version properly. + # We need to use bash to configure the build date and version properly. + - name: "gcr.io/cloud-builders/docker" + args: + - -c + - > + docker + buildx + create + --name=multi-builder + --use - name: "gcr.io/cloud-builders/docker" entrypoint: /bin/bash args: - -c - > docker - build + buildx + --platform + linux/amd64,linux/arm64/v8 -t gcr.io/$PROJECT_ID/kustomize:${_GIT_TAG} -t