mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Merge pull request #96462 from claudiubelu/test-images-multiarch
test images: Adds -p yes when calling register.sh
This commit is contained in:
commit
eecbdea3d6
@ -9,7 +9,7 @@ options:
|
||||
substitution_option: ALLOW_LOOSE
|
||||
machineType: 'N1_HIGHCPU_8'
|
||||
steps:
|
||||
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20200422-b25d964'
|
||||
- name: 'gcr.io/k8s-testimages/gcb-docker-gcloud:v20201130-750d12f'
|
||||
entrypoint: 'bash'
|
||||
dir: ./test/images/
|
||||
env:
|
||||
@ -21,11 +21,12 @@ steps:
|
||||
# The default cloudbuild has HOME=/builder/home and docker buildx is in /root/.docker/cli-plugins/docker-buildx
|
||||
# We need to set the HOME to /root explicitly since we're using docker buildx
|
||||
- HOME=/root
|
||||
# NOTE(claudiub): we need to call register.sh before creating and bootstraping a docker buildx instance.
|
||||
args:
|
||||
- '-c'
|
||||
- |
|
||||
gcloud auth configure-docker \
|
||||
&& docker run --rm --privileged multiarch/qemu-user-static --reset -p yes \
|
||||
&& ../../third_party/multiarch/qemu-user-static/register/register.sh --reset -p yes \
|
||||
&& export DOCKER_CLI_EXPERIMENTAL=enabled \
|
||||
&& docker buildx create --name img-builder --use \
|
||||
&& docker buildx inspect --bootstrap \
|
||||
|
@ -21,6 +21,9 @@ set -o pipefail
|
||||
TASK=$1
|
||||
WHAT=$2
|
||||
|
||||
# docker buildx command is still experimental as of Docker 19.03.0
|
||||
export DOCKER_CLI_EXPERIMENTAL="enabled"
|
||||
|
||||
# Connecting to a Remote Docker requires certificates for authentication, which can be found
|
||||
# at this path. By default, they can be found in the ${HOME} folder. We're expecting to find
|
||||
# here ".docker-${os_version}" folders which contains the necessary certificates.
|
||||
@ -149,7 +152,7 @@ build() {
|
||||
if [[ $(id -u) != 0 ]]; then
|
||||
sudo=sudo
|
||||
fi
|
||||
${sudo} "${KUBE_ROOT}/third_party/multiarch/qemu-user-static/register/register.sh" --reset
|
||||
${sudo} "${KUBE_ROOT}/third_party/multiarch/qemu-user-static/register/register.sh" --reset -p yes
|
||||
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/"${QEMUVERSION}"/x86_64_qemu-"${QEMUARCHS[$arch]}"-static.tar.gz | tar -xz -C "${temp_dir}"
|
||||
# Ensure we don't get surprised by umask settings
|
||||
chmod 0755 "${temp_dir}/qemu-${QEMUARCHS[$arch]}-static"
|
||||
@ -189,8 +192,6 @@ push() {
|
||||
|
||||
kube::util::ensure-gnu-sed
|
||||
|
||||
# The manifest command is still experimental as of Docker 18.09.2
|
||||
export DOCKER_CLI_EXPERIMENTAL="enabled"
|
||||
# reset manifest list; needed in case multiple images are being built / pushed.
|
||||
manifest=()
|
||||
# Make os_archs list into image manifest. Eg: 'linux/amd64 linux/ppc64le' to '${REGISTRY}/${image}:${TAG}-linux-amd64 ${REGISTRY}/${image}:${TAG}-linux-ppc64le'
|
||||
|
Loading…
Reference in New Issue
Block a user