Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly pin busybox and debian downloads
Browse files Browse the repository at this point in the history
Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
tianon committed Jan 12, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent da548c1 commit ef0bec2
Showing 1 changed file with 68 additions and 12 deletions.
80 changes: 68 additions & 12 deletions tests/integration/get-images.sh
Original file line number Diff line number Diff line change
@@ -43,24 +43,80 @@ function get() {
}

arch=$(go env GOARCH)
# Convert from GOARCH to whatever the URLs below are using.
if [ "$arch" = 'arm' ]; then
arm=$(go env GOARM)
: "${arm:=7}"
arch=${arch}v$arm
fi

# busybox
case $arch in
arm64)
arch=arm64v8
;;
386)
arch=i386
# https://github.com/docker-library/busybox/tree/dist-amd64
amd64) commit=31d342ad033e27c18723a516a2274ab39547be27 ;;

# https://github.com/docker-library/busybox/tree/dist-arm32v5
armv5 | armv6) commit=96ea82ea25565f78b50bd032d5768d64985d6e11 ;;

# https://github.com/docker-library/busybox/tree/dist-arm32v7
armv7 | armv*) commit=5cb6c347469e86e4468e5e248de751b3598bb577 ;;

# https://github.com/docker-library/busybox/tree/dist-arm64v8
arm64) commit=94c664b5ca464546266bce54be0082874a44c7b2 ;;

# https://github.com/docker-library/busybox/tree/dist-i386
386) commit=461a473aef31b7726ea99909a24551bf44565c05 ;;

# https://github.com/docker-library/busybox/tree/dist-mips64le
mips64le) commit=47f73f7c735dcd6760a976bfe0012d251b6ef0a9 ;;

# https://github.com/docker-library/busybox/tree/dist-ppc64le
ppc64le) commit=9ca13bc214717966383cf97e08606b444b7300e4 ;;

# https://github.com/docker-library/busybox/tree/dist-s390x
s390x) commit=a03814d21bcf97767121bb9422a742ec237a09e2 ;;

*)
echo >&2 "error: unsupported architecture: '$arch'"
exit 1
;;
esac

# busybox
BUSYBOX_URL="https://github.com/docker-library/busybox/raw/$commit/stable/glibc/busybox.tar.xz"
BUSYBOX_IMAGE="$TESTDATA/busybox-${arch}.tar.xz"
get "$BUSYBOX_IMAGE" \
"https://github.com/docker-library/busybox/raw/dist-${arch}/stable/glibc/busybox.tar.xz"
get "$BUSYBOX_IMAGE" "$BUSYBOX_URL"
echo "BUSYBOX_IMAGE=$BUSYBOX_IMAGE"

# debian
case $arch in
# https://github.com/debuerreotype/docker-debian-artifacts/tree/dist-amd64
amd64) commit=686d9f6eaada08a754bc7abf6f6184c65c5b378f ;;

# https://github.com/debuerreotype/docker-debian-artifacts/tree/dist-arm32v5
armv5 | armv6) commit=155640b6e2e249dfaeee8795d5de539ef3e49417 ;;

# https://github.com/debuerreotype/docker-debian-artifacts/tree/dist-arm32v7
armv7 | armv*) commit=60ff0c2c6ce9556e5d8a2758dd2b3f3731716a6f ;;

# https://github.com/debuerreotype/docker-debian-artifacts/tree/dist-arm64v8
arm64) commit=2f108af35e22064c848b8628a7cac56192246dba ;;

# https://github.com/debuerreotype/docker-debian-artifacts/tree/dist-i386
386) commit=e4db8aa97f4366e6f27ddbdeaed0773fe0288d47 ;;

# https://github.com/debuerreotype/docker-debian-artifacts/tree/dist-mips64le
mips64le) commit=e28cbd76dcfba10446b1722aebb5a996121e3d27 ;;

# https://github.com/debuerreotype/docker-debian-artifacts/tree/dist-ppc64le
ppc64le) commit=3ba08903ca3fd48fe59ba92b02744a2f5d4d9d6f ;;

# https://github.com/debuerreotype/docker-debian-artifacts/tree/dist-s390x
s390x) commit=2fddbf8fe632fc5865b140341b68a1358586fff2 ;;

*)
echo >&2 "error: unsupported architecture: '$arch'"
exit 1
;;
esac
DEBIAN_URL="https://github.com/debuerreotype/docker-debian-artifacts/raw/$commit/buster/slim/rootfs.tar.xz"
DEBIAN_IMAGE="$TESTDATA/debian-${arch}.tar.xz"
get "$DEBIAN_IMAGE" \
"https://github.com/debuerreotype/docker-debian-artifacts/raw/dist-${arch}/buster/slim/rootfs.tar.xz"
get "$DEBIAN_IMAGE" "$DEBIAN_URL"
echo "DEBIAN_IMAGE=$DEBIAN_IMAGE"

0 comments on commit ef0bec2

Please sign in to comment.