]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-pull-requests: forcefully destroy every scenario when tests are completed
authorAlfredo Deza <adeza@redhat.com>
Wed, 16 Nov 2016 14:03:29 +0000 (09:03 -0500)
committerAlfredo Deza <adeza@redhat.com>
Wed, 16 Nov 2016 16:55:25 +0000 (11:55 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-ansible-pull-requests/build/teardown

index a7a19dd11cb1ed09f4d12c6ee88d946d3d1f806a..cb0d68b24414cc60d064764f28c0ee1647d5ff0b 100644 (file)
@@ -1,7 +1,13 @@
 #!/bin/bash
+# There has to be a better way to do this than this script which just looks
+# for every Vagrantfile in scenarios and then just destroys whatever is left.
 
-NODE=$(echo $NODE_NAME | awk -F'__' '{print $2}')
-# The "delay" means that mita will wait these many seconds before proceeding
-# with the deletion of the node
-echo "curl -k  -d '{"delay": 5}' -X POST https://mita.ceph.com/api/nodes/${NODE}/delete/"
-curl -k  -d '{"delay": 5}' -X POST https://mita.ceph.com/api/nodes/${NODE}/delete/
+cd $WORKSPACE
+
+scenarios=$(find . | grep Vagrantfile | xargs dirname)
+
+for scenario in $scenarios; do
+    cd $scenario
+    vagrant destroy -f
+    cd -
+done