forked from kubernetes-sigs/cloud-provider-kind
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Ib6a89c7c2f88dd3fbfa526a1458e8cb58ab356f0
- Loading branch information
Showing
3 changed files
with
68 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# See https://cloud.google.com/cloud-build/docs/build-config | ||
options: | ||
substitution_option: ALLOW_LOOSE | ||
machineType: E2_HIGHCPU_32 | ||
steps: | ||
- name: gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20240718-5ef92b5c36 | ||
entrypoint: make | ||
env: | ||
- REGISTRY=gcr.io/k8s-staging-kind | ||
- IMAGE_NAME=cloud-provider-kind | ||
args: ['release'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2020 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -o errexit -o nounset -o pipefail | ||
|
||
# We can skip setup if the current builder already has multi-arch | ||
# AND if it isn't the docker driver, which doesn't work | ||
current_builder="$(docker buildx inspect)" | ||
# linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6 | ||
if ! grep -q "^Driver: docker$" <<<"${current_builder}" && \ | ||
grep -q "linux/amd64" <<<"${current_builder}" && \ | ||
grep -q "linux/arm64" <<<"${current_builder}"; then | ||
exit 0 | ||
fi | ||
|
||
# Ensure qemu is in binfmt_misc | ||
# Docker desktop already has these in versions recent enough to have buildx | ||
# We only need to do this setup on linux hosts | ||
if [ "$(uname)" == 'Linux' ]; then | ||
# NOTE: this is pinned to a digest for a reason! | ||
docker run --rm --privileged tonistiigi/binfmt:qemu-v7.0.0-28@sha256:66e11bea77a5ea9d6f0fe79b57cd2b189b5d15b93a2bdb925be22949232e4e55 --install all | ||
fi | ||
|
||
# Ensure we use a builder that can leverage it (the default on linux will not) | ||
docker buildx rm knp-builder || true | ||
docker buildx create --use --name=knp-builder |