From 012049df080aca7d676bfddbfce98430c478cfb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 2 Dec 2019 15:59:10 +0100 Subject: templates/alpine.run: download latest rootfs --- templates/alpine.run | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'templates/alpine.run') diff --git a/templates/alpine.run b/templates/alpine.run index bba82ad..b0d61fd 100755 --- a/templates/alpine.run +++ b/templates/alpine.run @@ -27,9 +27,10 @@ mkdir -p "$TWORKSPACE/distfiles" "$WORKSPACE/packages" if [ ! -d "$ROOT" ]; then # Prepare new root if there is none - # TODO get latest uri from latest-releases.yml file + rootfs="$(curl http://dl-cdn.alpinelinux.org/alpine/edge/releases/x86_64/latest-releases.yaml | \ + yq -r 'map(select(.flavor == "alpine-minirootfs")) | .[0].file')" echo_stage "Setting up new root" - wget "http://dl-cdn.alpinelinux.org/alpine/edge/releases/$ARCH/alpine-minirootfs-3.9.0-$ARCH.tar.gz" -O alpine.tar.gz + wget "http://dl-cdn.alpinelinux.org/alpine/edge/releases/$ARCH/$rootfs" -O alpine.tar.gz # TODO verify signature gunzip alpine.tar.gz # tar is not able to change compressed files tar -f alpine.tar --delete ./dev/null -- cgit v1.2.3