fix(ci): survive expired github download urls
GitHub answers a release asset download with HTTP 618 (jwt:expired) once the signed URL has expired, and the build layer dies on it. Two runs in a row lost build (24.04) on gh_2.106.0_linux_amd64.tar.gz while the same file downloaded fine in a sibling job of the same run. Wrap curl in /usr/local/bin with retries and a no-cache request header, which covers the Dockerfile downloads and installer scripts such as cargo-zigbuild-installer.sh. Pull request builds also read the buildcache-<base> registry cache that release.yaml writes on every main push, so a cache hit skips the downloads. Signed-off-by: fristyxd <gpg@fristy.dev>
This commit is contained in:
3 files changed
+31
No files matched your search
@@ -49,6 +49,12 @@ ENV DEBIAN_FRONTEND=noninteractive \
|
||||
|
||||
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
|
||||
|
||||
RUN printf '%s\n' \
|
||||
'#!/bin/sh' \
|
||||
'exec /usr/bin/curl --retry 5 --retry-all-errors --retry-delay 2 -H "Cache-Control: no-cache" "$@"' \
|
||||
> /usr/local/bin/curl \
|
||||
&& chmod 0755 /usr/local/bin/curl
|
||||
|
||||
RUN case "${TARGETARCH}" in \
|
||||
amd64) arch=x86_64; goarch=amd64; node_arch=x64; gh_arch=amd64; trivy_arch=64bit; zig_arch=x86_64 ;; \
|
||||
arm64) arch=aarch64; goarch=arm64; node_arch=arm64; gh_arch=arm64; trivy_arch=ARM64; zig_arch=aarch64 ;; \
|
||||
|
||||
Reference in new issue
Block a user