Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions ast/parser/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 9 additions & 1 deletion examples/zig/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/cloud-push-pull/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions tests/with-docker-kind/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Comment thread
gilescope marked this conversation as resolved.
[ "$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 && \
Expand All @@ -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 && \
Expand Down
Loading