[Qa-jenkins-scm] [jenkins.debian.net] 01/01: lvc: generally discard snapshots
Holger Levsen
holger at layer-acht.org
Fri Jan 27 11:31:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 55686252cdf6b2bf8799ca1f0c7d66380eaea9b9
Author: Philip Hands <phil at hands.com>
Date: Fri Jan 27 12:18:26 2017 +0100
lvc: generally discard snapshots
Keeping them results in subsequent runs doing nothing much, which
is a little confusing. We should instead separate jobs that start
from the snapshots, and then pass the snapshots between jobs when
they succeed, as this should make later tests more resilient to when
the early part is failing and would prevent the later tests from running.
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/lvc.sh | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/bin/lvc.sh b/bin/lvc.sh
index f74ced0..310ef48 100755
--- a/bin/lvc.sh
+++ b/bin/lvc.sh
@@ -142,24 +142,20 @@ 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 $PU_ISO ; 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
+# discard any snapshots to ensure a clean run (we used to do this conditionally here, but that proved confusing)
+discard_snapshots $LIBVIRT_DOMAIN_NAME
echo "Debug log available at runtime at https://jenkins.debian.net/view/lvc/job/$JOB_NAME/ws/results/debug.log"
/srv/jenkins/cucumber/bin/run_test_suite --capture-all --keep-snapshots --vnc-server-only --iso $IMAGE --tmpdir $WORKSPACE --old-iso $IMAGE -- --format pretty --format pretty_debug --out $RESULTS/debug.log /srv/jenkins/cucumber/features/step_definitions /srv/jenkins/cucumber/features/support "${@}" || {
RETVAL=$?
+ # it may make sense to keep snapshots on failure, so subsequent tests are quicker -- only if we stop discarding them above though
discard_snapshots $LIBVIRT_DOMAIN_NAME
exit $RETVAL
}
+# FIXME -- decide here if we need to keep any snapshots, and put them somewhere safe for other jobs to find
+discard_snapshots $LIBVIRT_DOMAIN_NAME
cleanup_all
# don't cleanup twice
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list