From db0c2a7dc80d5b6d65ac8e4e8c64026f342fd987 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 4 Jun 2020 10:52:04 +0200 Subject: [PATCH 1/3] cloud build: initialize support for running commands in Dockerfile If the Dockerfile needs to run some command, that step fails unless QEMU is set up properly first: failed to solve: rpc error: code = Unknown desc = failed to load LLB: runtime execution on platform linux/ppc64le not supported --- prow.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/prow.sh b/prow.sh index 93964e18e..32ec871a3 100755 --- a/prow.sh +++ b/prow.sh @@ -1198,6 +1198,12 @@ gcr_cloud_build () { # Required for "docker buildx build --push". gcloud auth configure-docker + if find . -name Dockerfile | grep -v ^./vendor | xargs --no-run-if-empty cat | grep -q ^RUN; then + # Needed for "RUN" steps on non-linux/amd64 platforms. + # See https://github.com/multiarch/qemu-user-static#getting-started + (set -x; docker run --rm --privileged multiarch/qemu-user-static --reset -p yes) + fi + # Extract tag-n-hash value from GIT_TAG (form vYYYYMMDD-tag-n-hash) for REV value. REV=v$(echo "$GIT_TAG" | cut -f3- -d 'v') From 3df86b7d437d7126a1ffb79ff05b0e467748b920 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 12 Jun 2020 15:48:26 +0200 Subject: [PATCH 2/3] cloud build: k8s-staging-sig-storage As discussed in https://github.com/kubernetes/k8s.io/pull/943, we want to consolidate under k8s-staging-sig-storage. --- cloudbuild.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 1def14994..a22c0e7ac 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -12,6 +12,8 @@ # # See https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md # for more details on image pushing process in Kubernetes. +# +# To promote release images, see https://github.com/kubernetes/k8s.io/tree/master/k8s.gcr.io/images/k8s-staging-sig-storage. # This must be specified in seconds. If omitted, defaults to 600s (10 mins). timeout: 1200s @@ -38,7 +40,7 @@ substitutions: # a branch like 'master' or 'release-0.2', or a tag like 'v0.2'. _PULL_BASE_REF: 'master' # The default gcr.io staging project for Kubernetes-CSI - # (=> https://console.cloud.google.com/gcr/images/k8s-staging-csi/GLOBAL). + # (=> https://console.cloud.google.com/gcr/images/k8s-staging-sig-storage/GLOBAL). # Might be overridden in the Prow build job for a repo which wants # images elsewhere. - _STAGING_PROJECT: 'k8s-staging-csi' + _STAGING_PROJECT: 'k8s-staging-sig-storage' From 43e50d6f6471f476acd5c90cd3788e198a86d9f8 Mon Sep 17 00:00:00 2001 From: Yibo Cai Date: Tue, 16 Jun 2020 10:45:09 +0800 Subject: [PATCH 3/3] prow.sh: enable building arm64 image --- prow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prow.sh b/prow.sh index 32ec871a3..9778635f9 100755 --- a/prow.sh +++ b/prow.sh @@ -85,7 +85,7 @@ get_versioned_variable () { echo "$value" } -configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; windows amd64 .exe; linux ppc64le -ppc64le; linux s390x -s390x" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries" +configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; windows amd64 .exe; linux ppc64le -ppc64le; linux s390x -s390x; linux arm64 -arm64" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries" # If we have a vendor directory, then use it. We must be careful to only # use this for "make" invocations inside the project's repo itself because