-
Notifications
You must be signed in to change notification settings - Fork 223
chore(ci): multi-arch e2e-runner image & add oc-mirror and podman
#5036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a346480
0c1869f
dce41c3
0929eaf
183e3bc
2f11186
ed06478
676d9ee
1e5842a
6e54304
53b1e69
7607008
cc3d81e
7f72f46
524341e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,10 @@ | ||
| # Base image from Microsoft Playwright | ||
| # Playwright v1.59.1-noble includes Node 24.14.1 | ||
| FROM mcr.microsoft.com/playwright:v1.61.1-noble@sha256:824f1a789072e648c62541c2cfa4479c4061a290d5c27766d67dc1dcbc19b321 | ||
| # Base image from Microsoft Playwright (multi-arch: amd64 + arm64) | ||
| # Playwright v1.61.1-noble includes Node 24.14.1 | ||
| # Pinned to manifest list digest to support both platforms | ||
| FROM mcr.microsoft.com/playwright:v1.61.1-noble@sha256:5b8f294aff9041b7191c34a4bab3ac270157a28774d4b0660e9743297b697e48 | ||
Check noticeCode scanning / SonarCloud Docker containers should not run as a privileged user Low
This image runs with "root" or "containerAdministrator" as the default user. Make sure it is safe here. See more on SonarQube Cloud
Check warning on line 4 in .ci/images/Dockerfile
|
||
|
|
||
| # Automatically set by buildx/podman based on --platform (amd64 or arm64) | ||
| ARG TARGETARCH | ||
|
|
||
| # Set environment variables for the container | ||
| ENV CI=1 \ | ||
|
|
@@ -9,12 +13,9 @@ | |
| _MITSHM=0 \ | ||
| NODE_PATH=/usr/local/lib/node_modules \ | ||
| HELM_VERSION="v3.17.2" \ | ||
| OC_VERSION="4.19.17" \ | ||
| OC_VERSION="4.22.3" \ | ||
| OCM_VERSION="0.1.76" \ | ||
| GO_VERSION="1.19" \ | ||
| GO_SHA256="464b6b66591f6cf055bc5df90a9750bf5fbc9d038722bb84a9d56a2bea974be6" \ | ||
| GOPATH="/go" \ | ||
| PATH="$GOPATH/bin:/usr/local/go/bin:$PATH" | ||
| UMOCI_VERSION="v0.6.0" | ||
|
|
||
| # Copy Yarn configuration files to correctly use the project-defined Yarn version | ||
| COPY .yarn /root/.yarn | ||
|
|
@@ -52,15 +53,22 @@ | |
| # Check where Node.js loads required modules | ||
| node -p 'module.paths' | ||
|
|
||
| # Install Helm, OpenShift CLI, ocm-cli, and yq | ||
| RUN curl -fsSL -o /tmp/helm.tar.gz "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" && \ | ||
| tar -xzvf /tmp/helm.tar.gz -C /tmp && mv /tmp/linux-amd64/helm /usr/local/bin/helm && \ | ||
| curl -fsSL -o /tmp/openshift-client-linux.tar.gz "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OC_VERSION}/openshift-client-linux-${OC_VERSION}.tar.gz" && \ | ||
| # Install Helm, OpenShift CLI, oc-mirror, ocm-cli, and yq | ||
| # OC client: amd64 has no arch suffix (default), arm64 needs "-arm64". | ||
| # oc-mirror: arm64 lives under "openshift-v4/aarch64/" mirror tree. | ||
| RUN OC_ARCH_SUFFIX=$([ "${TARGETARCH}" = "arm64" ] && echo "-arm64" || echo "") && \ | ||
| OC_MIRROR_TREE=$([ "${TARGETARCH}" = "arm64" ] && echo "openshift-v4/aarch64" || echo "openshift-v4") && \ | ||
| curl -fsSL -o /tmp/helm.tar.gz "https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" && \ | ||
| tar -xzvf /tmp/helm.tar.gz -C /tmp && mv /tmp/linux-${TARGETARCH}/helm /usr/local/bin/helm && \ | ||
| curl -fsSL -o /tmp/openshift-client-linux.tar.gz "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OC_VERSION}/openshift-client-linux${OC_ARCH_SUFFIX}-${OC_VERSION}.tar.gz" && \ | ||
| tar -xzvf /tmp/openshift-client-linux.tar.gz -C /usr/local/bin oc kubectl && \ | ||
| curl -Lo /usr/local/bin/ocm "https://github.com/openshift-online/ocm-cli/releases/download/v${OCM_VERSION}/ocm-linux-amd64" && \ | ||
| curl -fsSL -o /tmp/oc-mirror.tar.gz "https://mirror.openshift.com/pub/${OC_MIRROR_TREE}/clients/ocp/${OC_VERSION}/oc-mirror.tar.gz" && \ | ||
| tar -xzvf /tmp/oc-mirror.tar.gz -C /usr/local/bin oc-mirror && \ | ||
| chmod +x /usr/local/bin/oc-mirror && \ | ||
| curl -Lo /usr/local/bin/ocm "https://github.com/openshift-online/ocm-cli/releases/download/v${OCM_VERSION}/ocm-linux-${TARGETARCH}" && \ | ||
| chmod +x /usr/local/bin/ocm && \ | ||
| curl -fsSL "https://github.com/mikefarah/yq/releases/download/v4.43.1/yq_linux_amd64.tar.gz" | tar -xz && \ | ||
| mv yq_linux_amd64 /usr/local/bin/yq && \ | ||
| curl -fsSL "https://github.com/mikefarah/yq/releases/download/v4.43.1/yq_linux_${TARGETARCH}.tar.gz" | tar -xz && \ | ||
| mv yq_linux_${TARGETARCH} /usr/local/bin/yq && \ | ||
| rm -rf /tmp/* /var/tmp/* | ||
|
|
||
| # Install Azure CLI | ||
|
|
@@ -74,29 +82,31 @@ | |
| apt-get install google-cloud-cli google-cloud-sdk-gke-gcloud-auth-plugin -y && \ | ||
| rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
|
||
| # Install AWS CLI | ||
| RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ | ||
| # Install AWS CLI (uname -m returns x86_64 on amd64, aarch64 on arm64 — matching AWS URL naming) | ||
| RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && \ | ||
| unzip awscliv2.zip && \ | ||
| ./aws/install | ||
| ./aws/install && \ | ||
| rm -rf awscliv2.zip aws/ | ||
|
|
||
| # Install skopeo | ||
| # Install skopeo and podman | ||
| RUN apt-get update -y && \ | ||
| apt-get install -y skopeo | ||
| apt-get install -y --no-install-recommends skopeo podman && \ | ||
| apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
|
||
| # Install PostgreSQL CLI (psql only) | ||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends postgresql-client && \ | ||
| rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
|
||
| # Install umoci | ||
| RUN curl -LO "https://github.com/opencontainers/umoci/releases/download/v0.4.7/umoci.amd64" && \ | ||
| chmod +x umoci.amd64 && \ | ||
| mv umoci.amd64 /usr/local/bin/umoci | ||
| # Install umoci (v0.6.0+ provides multi-arch binaries) | ||
| RUN curl -LO "https://github.com/opencontainers/umoci/releases/download/${UMOCI_VERSION}/umoci.linux.${TARGETARCH}" && \ | ||
| chmod +x "umoci.linux.${TARGETARCH}" && \ | ||
| mv "umoci.linux.${TARGETARCH}" /usr/local/bin/umoci | ||
|
|
||
| # Install opm | ||
| RUN curl -LO "https://github.com/operator-framework/operator-registry/releases/download/v1.47.0/linux-amd64-opm" && \ | ||
| chmod +x linux-amd64-opm && \ | ||
| mv linux-amd64-opm /usr/local/bin/opm | ||
| RUN curl -LO "https://github.com/operator-framework/operator-registry/releases/download/v1.47.0/linux-${TARGETARCH}-opm" && \ | ||
| chmod +x "linux-${TARGETARCH}-opm" && \ | ||
| mv "linux-${TARGETARCH}-opm" /usr/local/bin/opm | ||
|
|
||
| # Install Operator SDK CLI (required to install OLM on K8s clusters) | ||
| RUN export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac) && \ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.