Skip to content

Commit 626a107

Browse files
committed
ci(testing): download the flux installer with --fail in the e2e-sandbox image
The flux install piped `curl -sSL` into bash, so on a 4xx/5xx the error page was piped into the shell and curl's exit code was lost. Download the installer to a file with `curl -fsSL` first, then run it, so an HTTP error fails the build step instead of feeding bash a bad script. Assisted-by: LLM Signed-off-by: IvanHunters <[email protected]>
1 parent f6b4fb1 commit 626a107

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/core/testing/images/e2e-sandbox

‎packages/core/testing/images/e2e-sandbox/Dockerfile‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ RUN curl -sSL "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/${TARGETOS}/${T
2020
RUN curl -sSL "https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3" | bash -s - --version "v${HELM_VERSION}"
2121
RUN curl -sSL "https://github.com/mikefarah/yq/releases/download/v4.53.3/yq_${TARGETOS}_${TARGETARCH}" -o /usr/local/bin/yq \
2222
&& chmod +x /usr/local/bin/yq
23-
RUN curl -sSL "https://fluxcd.io/install.sh" | FLUX_VERSION="${FLUX_VERSION}" bash
23+
RUN curl -fsSL "https://fluxcd.io/install.sh" -o /tmp/flux-install.sh \
24+
&& FLUX_VERSION="${FLUX_VERSION}" bash /tmp/flux-install.sh \
25+
&& rm -f /tmp/flux-install.sh
2426
RUN curl -sSL "https://github.com/cozystack/cozyhr/raw/refs/heads/main/hack/install.sh" | sh -s -- -v "${COZYHR_VERSION}"
2527
RUN curl -fsSL "https://dl.min.io/client/mc/release/${TARGETOS}-${TARGETARCH}/mc" --create-dirs -o /usr/local/bin/mc \
2628
&& chmod +x /usr/local/bin/mc

0 commit comments

Comments
 (0)