From 8bcbe2dbe30be64b995d920144dd28493fb1a163 Mon Sep 17 00:00:00 2001 From: Philip Hands Date: Sun, 5 Jun 2016 21:16:12 +0200 Subject: lvc: download ISO before checking the snapshots Signed-off-by: Holger Levsen --- bin/lvc.sh | 15 ++++++++------- 1 file 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" -- cgit v1.2.3-70-g09d2