From 7a7512da308eeb8559577bb9f901bebf04f29269 Mon Sep 17 00:00:00 2001 From: nbykov0 <166552198+nbykov0@users.noreply.github.com> Date: Sat, 10 May 2025 22:12:45 +0300 Subject: [PATCH] core/testing: multiarch support Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com> --- packages/core/testing/Makefile | 2 ++ .../testing/images/e2e-sandbox/Dockerfile | 24 ++++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/core/testing/Makefile b/packages/core/testing/Makefile index 7b1eb049..b620c947 100755 --- a/packages/core/testing/Makefile +++ b/packages/core/testing/Makefile @@ -17,6 +17,8 @@ image: image-e2e-sandbox image-e2e-sandbox: docker buildx build -f images/e2e-sandbox/Dockerfile ../../.. \ --provenance false \ + --builder=$(BUILDER) \ + --platform=$(PLATFORM) \ --tag $(REGISTRY)/e2e-sandbox:$(call settag,$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/e2e-sandbox:latest \ --cache-to type=inline \ diff --git a/packages/core/testing/images/e2e-sandbox/Dockerfile b/packages/core/testing/images/e2e-sandbox/Dockerfile index 8318e982..3b25dfc6 100755 --- a/packages/core/testing/images/e2e-sandbox/Dockerfile +++ b/packages/core/testing/images/e2e-sandbox/Dockerfile @@ -4,14 +4,16 @@ ARG KUBECTL_VERSION=1.32.0 ARG TALOSCTL_VERSION=1.9.5 ARG HELM_VERSION=3.16.4 -RUN apt-get update -RUN apt-get -y install genisoimage qemu-kvm qemu-utils iproute2 iptables wget xz-utils netcat curl jq make git -RUN curl -LO "https://github.com/siderolabs/talos/releases/download/v${TALOSCTL_VERSION}/talosctl-linux-amd64" \ - && chmod +x talosctl-linux-amd64 \ - && mv talosctl-linux-amd64 /usr/local/bin/talosctl -RUN curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" \ - && chmod +x kubectl \ - && mv kubectl /usr/local/bin/kubectl -RUN curl -sSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash -s - --version "v${HELM_VERSION}" -RUN wget https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64 -O /usr/local/bin/yq && chmod +x /usr/local/bin/yq -RUN curl -s https://fluxcd.io/install.sh | bash +ARG TARGETOS +ARG TARGETARCH + +RUN apt update -q +RUN apt install -yq --no-install-recommends ca-certificates qemu-kvm qemu-utils iproute2 iptables wget xz-utils netcat curl jq make git +RUN curl -sSL "https://github.com/siderolabs/talos/releases/download/v${TALOSCTL_VERSION}/talosctl-${TARGETOS}-${TARGETARCH}" -o /usr/local/bin/talosctl \ + && chmod +x /usr/local/bin/talosctl +RUN curl -sSL "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/${TARGETOS}/${TARGETARCH}/kubectl" -o /usr/local/bin/kubectl \ + && chmod +x /usr/local/bin/kubectl +RUN curl -sSL "https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3" | bash -s - --version "v${HELM_VERSION}" +RUN curl -sSL "https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_${TARGETOS}_${TARGETARCH}" -o /usr/local/bin/yq \ + && chmod +x /usr/local/bin/yq +RUN curl -sSL "https://fluxcd.io/install.sh" | bash