summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Hands <phil@hands.com>2016-06-05 21:16:12 +0200
committerHolger Levsen <holger@layer-acht.org>2016-06-05 22:13:52 +0200
commit8bcbe2dbe30be64b995d920144dd28493fb1a163 (patch)
treeeea2e9d19d0cde1da093e20a804f606dd4c25959
parentf3a29b4b226493ce46268ecdfe551d99e60dc844 (diff)
downloadjenkins.debian.net-8bcbe2dbe30be64b995d920144dd28493fb1a163.tar.xz
lvc: download ISO before checking the snapshots
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-xbin/lvc.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/lvc.sh b/bin/lvc.sh
index 11de2685..80163b01 100755
--- a/bin/lvc.sh
+++ b/bin/lvc.sh
@@ -68,13 +68,6 @@ mkdir -p $RESULTS
mkdir -p $WORKSPACE/DebianToasterStorage
-for dep in /srv/jenkins/cucumber /srv/jenkins/bin/lvc.sh /srv/jenkins/job-cfg/lvc.yaml $NETBOOT ; do
- if [ -e "$dep" ] ; then
- LV_SNAP_DEPENDS="$LV_SNAP_DEPENDS $dep"
- fi
-done
-discard_snapshots $LIBVIRT_DOMAIN_NAME $LV_SNAP_DEPENDS
-
trap cleanup_all INT TERM EXIT
#
@@ -124,6 +117,14 @@ else
fetch_if_newer "$INITRD" "$URL/$INITRD"
fi
+# discard any snapshots that are older than the inputs
+for dep in /srv/jenkins/cucumber /srv/jenkins/bin/lvc.sh /srv/jenkins/job-cfg/lvc.yaml $NETBOOT ; do
+ if [ -e "$dep" ] ; then
+ LV_SNAP_DEPENDS="$LV_SNAP_DEPENDS $dep"
+ fi
+done
+discard_snapshots $LIBVIRT_DOMAIN_NAME $LV_SNAP_DEPENDS
+
# --keep-snapshots -- keeps the VM snapshots -- let's make life simple and not do that until we're using them to pass on state to the next jenkins job
echo "Debug log available at runtime at https://jenkins.debian.net/view/lvc/job/$JOB_NAME/ws/results/debug.log"