aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2018-02-25 20:20:28 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-03-05 16:49:03 +0100
commit2393964b7734523f8718c9113712b0d6aa1b8c0f (patch)
treefe255f3abb904bc612b0c852434d2ba790b79590
parent9ee4df8760d132e408822f40d2e9d14447d1d9bf (diff)
jenkins.sh: fix the download url if the qemu image wasn't setup
Download the image from yesterday because linuxcontainers only contains the images of the last 3 days. Change-Id: I75e270b7255c1cd7fca1674111b0f19fc7bba74f (cherry picked from commit 28b8cc6283487bceace86fc9d7ee77bc9ba6123f)
-rwxr-xr-xcontrib/jenkins.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 11def5c..35a9627 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -36,7 +36,8 @@ if [ -z "${INSIDE_CHROOT}" ]; then
sed -i "s/setup_proc//g" "$ROOTFS/debootstrap/suite-script"
mychroot /debootstrap/debootstrap --second-stage --verbose http://ftp.de.debian.org/debian/
else
- wget -nc -q "https://uk.images.linuxcontainers.org/images/debian/stretch/armhf/default/20180114_22:42/rootfs.tar.xz"
+ YESTERDAY=$(python -c 'import datetime ; print((datetime.datetime.now() - datetime.timedelta(days=1)).strftime("%Y%m%d"))')
+ wget -nc -q "https://uk.images.linuxcontainers.org/images/debian/stretch/armhf/default/${YESTERDAY}_22:42/rootfs.tar.xz"
tar -xf rootfs.tar.xz -C "$ROOTFS/" || true
echo "nameserver 8.8.8.8" > "$ROOTFS/etc/resolv.conf"
fi