]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-prs: fix leftover 870/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Sun, 24 Sep 2017 02:39:13 +0000 (04:39 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Sun, 24 Sep 2017 13:00:12 +0000 (15:00 +0200)
sometimes, it happens that the Jenkins Slave processes crashes before
teardown is executed (ie. `java.io.EOFException`), it means we keep
leftofver from previous build. This commit ensures before the test is
launched that no fetch directory from previous build is present.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
ceph-ansible-prs/build/build
ceph-ansible-prs/build/teardown

index 4cea7f09db971f59c1aa26bbd9a14db9af05741a..11a41a1c92a9515e8ce759fd6f3dc3487ba9b299 100644 (file)
@@ -13,6 +13,18 @@ delete_libvirt_vms
 clear_libvirt_networks
 restart_libvirt_services
 
+# This was initially in teardown but sometimes, it happens that the Jenkins Slave process
+# crashes before teardown is executed, it means we keep leftofver from previous build.
+# We ensure before the test is launched that no fetch directory from previous build is present.
+pushd $WORKSPACE/tests
+scenarios=$(find . -name Vagrantfile | xargs dirname)
+for scenario in $scenarios; do
+  pushd $scenario
+  rm -rf fetch/
+  popd
+done
+popd
+
 # the $SCENARIO var is injected by the job template. It maps
 # to an actual, defined, tox environment
 if ! timeout 3h $VENV/tox -rv -e=$RELEASE-$ANSIBLE_VERSION-$SCENARIO --workdir=$WORKDIR -- --provider=libvirt; then
index d33c32f0ba6bbdf725a7910f93cc2874dcc4fbeb..595e2f9e11f559a6ccc6cf25cf578195d5c8ae34 100644 (file)
@@ -9,7 +9,6 @@ scenarios=$(find . -name Vagrantfile | xargs dirname)
 for scenario in $scenarios; do
     pushd $scenario
     vagrant destroy -f
-    rm -rf fetch/
     popd
 done