Skip to content

Commit c9b5aab

Browse files
e2e-fix-agentclaude
andcommitted
refactor: simplify gcloud install, drop redundant apt deps
curl and python3 are already in the base image. Use dpkg --print-architecture instead of uname+sed for the download URL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a483fe2 commit c9b5aab

1 file changed

Lines changed: 7 additions & 22 deletions

File tree

images/code/Containerfile

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,32 +47,17 @@ RUN mkdir -p "$COREPACK_HOME" \
4747

4848
# ---------------------------------------------------------------------------
4949
# gcloud CLI — downloads E2E test artifacts from GCS buckets.
50-
# Prow stores nightly/PR test results in gs://test-platform-results.
51-
# The e2e-failure-analysis skill's download-artifacts.py calls
52-
# `gcloud storage rsync` and `gcloud storage cp` to fetch them.
53-
#
54-
# Install only the base SDK (no extra components) to keep the image lean.
55-
# Authentication is handled at runtime via service-account keys or
56-
# workload identity — no credentials are baked into the image.
57-
#
58-
# Pin to a specific version for reproducible builds.
50+
# Prow stores results in gs://test-platform-results; the e2e-failure-analysis
51+
# skill uses `gcloud storage rsync/cp` to fetch them.
52+
# Auth is runtime-only (service-account key or workload identity).
5953
ARG GCLOUD_VERSION=526.0.0
60-
RUN apt-get update \
61-
&& apt-get install -y --no-install-recommends \
62-
curl \
63-
python3 \
64-
&& curl -sSL "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-${GCLOUD_VERSION}-linux-$(uname -m | sed 's/aarch64/arm/;s/x86_64/x86_64/').tar.gz" \
54+
RUN curl -sSL "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-${GCLOUD_VERSION}-linux-$(dpkg --print-architecture).tar.gz" \
6555
| tar -xz -C /opt \
66-
&& /opt/google-cloud-sdk/install.sh \
67-
--quiet \
68-
--usage-reporting false \
69-
--command-completion false \
70-
--path-update false \
56+
&& /opt/google-cloud-sdk/install.sh --quiet --usage-reporting false \
57+
--command-completion false --path-update false \
7158
&& ln -s /opt/google-cloud-sdk/bin/gcloud /usr/local/bin/gcloud \
7259
&& ln -s /opt/google-cloud-sdk/bin/gsutil /usr/local/bin/gsutil \
73-
&& gcloud --version \
74-
&& apt-get clean \
75-
&& rm -rf /var/lib/apt/lists/*
60+
&& gcloud --version
7661

7762
# ---------------------------------------------------------------------------
7863
# pwtrace — Playwright trace analysis CLI for E2E failure debugging.

0 commit comments

Comments
 (0)