diff --git a/Earthfile b/Earthfile index 1a07404d42..5199a04486 100644 --- a/Earthfile +++ b/Earthfile @@ -124,7 +124,9 @@ lint: RUN apk add --no-cache curl # renovate: datasource=github-releases packageName=golangci/golangci-lint LET golangci_lint_version=2.12.2 - RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/main/install.sh | sh -s -- -b $(go env GOPATH)/bin v$golangci_lint_version + RUN curl -sSfL --retry 7 --retry-all-errors -o /tmp/golangci-install.sh https://raw.githubusercontent.com/golangci/golangci-lint/main/install.sh && \ + sh /tmp/golangci-install.sh -b $(go env GOPATH)/bin v$golangci_lint_version && \ + rm /tmp/golangci-install.sh COPY ./.golangci.yaml . COPY --dir +code/earthly / FOR mod_path IN $(find . -name go.mod -print0 | xargs -0 dirname) diff --git a/ast/parser/Earthfile b/ast/parser/Earthfile index 3b6e9cba80..1f35381a25 100644 --- a/ast/parser/Earthfile +++ b/ast/parser/Earthfile @@ -9,8 +9,7 @@ RUN apk add --no-cache ca-certificates curl openssl go && \ WORKDIR /usr/local/lib # renovate: datasource=github-releases packageName=antlr/antlr4 ARG --global ANTLR_VERSION=4.13.1 -RUN echo curl -O https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar -RUN curl -O https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar +RUN curl -fSLO --retry 7 --retry-all-errors https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar WORKDIR /earthly parser: diff --git a/examples/zig/Earthfile b/examples/zig/Earthfile index 56c568a488..8ab27ca795 100644 --- a/examples/zig/Earthfile +++ b/examples/zig/Earthfile @@ -13,13 +13,21 @@ deps: ARG ZIG_ARCH="aarch64" END RUN echo "Installing Zig $ZIG_VERSION for $ZIG_ARCH" + # ziglang.org throttles/drops CI downloads; on top of wget's own rapid + # retries, back off between attempts — rapid retries hit the same + # throttle and all fail. RUN \ if echo "$ZIG_VERSION" | grep -q -- "-dev"; then \ export URL="https://ziglang.org/builds/zig-$ZIG_ARCH-linux-$ZIG_VERSION.tar.xz"; \ else \ export URL="https://ziglang.org/download/$ZIG_VERSION/zig-$ZIG_ARCH-linux-$ZIG_VERSION.tar.xz"; \ fi && \ - wget --tries=5 --timeout=300 --continue -O zig.tar.xz "$URL" && \ + for i in 1 2 3 4 5; do \ + wget -t 5 -T 300 -c -O zig.tar.xz "$URL" && break; \ + [ "$i" -lt 5 ] || exit 1; \ + echo "Zig download attempt $i/5 failed; retrying" >&2; \ + sleep $((i * 10)); \ + done && \ mkdir zig && \ tar -xvf zig.tar.xz --strip-components 1 -C zig && \ ln -sf /zig/zig /usr/bin/zig diff --git a/tests/cloud-push-pull/Earthfile b/tests/cloud-push-pull/Earthfile index 4bb6827a6e..f52ef259e9 100644 --- a/tests/cloud-push-pull/Earthfile +++ b/tests/cloud-push-pull/Earthfile @@ -10,7 +10,7 @@ all: BUILD +amazon-elastic-container-registry google-base: - RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-420.0.0-linux-x86_64.tar.gz && \ + RUN curl -fO --retry 7 --retry-all-errors https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-420.0.0-linux-x86_64.tar.gz && \ tar -xvzf google-cloud-sdk-420.0.0-linux-x86_64.tar.gz && \ ./google-cloud-sdk/install.sh -q && \ ls -la /test/google-cloud-sdk diff --git a/tests/with-docker-kind/Earthfile b/tests/with-docker-kind/Earthfile index 8e202bceba..d47aef4e45 100644 --- a/tests/with-docker-kind/Earthfile +++ b/tests/with-docker-kind/Earthfile @@ -14,7 +14,11 @@ all: alpine-kind: ARG DIND_IMAGE=earthbuild/dind:alpine-3.22-docker-28.3.3-r5 FROM $DIND_IMAGE - RUN wget -O ./kind https://kind.sigs.k8s.io/dl/v$KIND_VERSION/kind-linux-amd64 && chmod +x kind + RUN for i in 1 2 3 4 5; do \ + wget -c -T 60 -O ./kind https://kind.sigs.k8s.io/dl/v$KIND_VERSION/kind-linux-amd64 && break; \ + [ "$i" -lt 5 ] || exit 1; \ + sleep $((i * 5)); \ + done && chmod +x kind WITH DOCKER RUN (update-alternatives --set iptables /usr/sbin/iptables-legacy || true) && ./kind create cluster --verbosity 99999 --retain || { \ ./kind export logs ./logs && \ @@ -26,7 +30,7 @@ alpine-kind: ubuntu-kind: ARG DIND_IMAGE=earthbuild/dind:ubuntu-24.04-docker-28.4.0-1 FROM $DIND_IMAGE - RUN curl -Lo ./kind https://kind.sigs.k8s.io/dl/v$KIND_VERSION/kind-linux-amd64 && chmod +x kind + RUN curl -fLo ./kind --retry 7 --retry-all-errors https://kind.sigs.k8s.io/dl/v$KIND_VERSION/kind-linux-amd64 && chmod +x kind WITH DOCKER RUN ./kind create cluster --verbosity 99999 --retain || { \ ./kind export logs ./logs && \