prototypes: bifrost: Remove /opt/stack from previous deployments
authorMarkos Chandras <mchandras@suse.de>
Wed, 29 Mar 2017 14:40:03 +0000 (15:40 +0100)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Fri, 11 Aug 2017 19:56:12 +0000 (12:56 -0700)
/opt/stack is being created by bifrost so the destroy-env.sh
script should be responsible for cleaning up all the remnants.
That way we can use the destroy-env.sh script outside of Jenkins
as well.

Change-Id: I72d9737cf2446ff3ffc02f195337a6873eceb5c0
Signed-off-by: Markos Chandras <mchandras@suse.de>
bifrost/scripts/destroy-env.sh
xci/xci-deploy.sh

index ce9d535..d570f10 100755 (executable)
@@ -14,6 +14,9 @@ if [[ $(whoami) != "root" ]]; then
     exit 1
 fi
 
+# Start fresh
+rm -rf /opt/stack
+
 # Delete all libvirt VMs and hosts from vbmc (look for a port number)
 for vm in $(vbmc list | awk '/[0-9]/{{ print $2 }}'); do
     virsh destroy $vm || true
index 326d659..277206d 100755 (executable)
@@ -40,7 +40,7 @@ echo "-------------------------------------------------------------------------"
 #-------------------------------------------------------------------------------
 echo "Info: Cleaning up the previous deployment"
 $XCI_PATH/../bifrost/scripts/destroy-env.sh > /dev/null 2>&1
-/bin/rm -rf /opt/releng /opt/bifrost /opt/openstack-ansible /opt/stack
+/bin/rm -rf /opt/releng /opt/bifrost /opt/openstack-ansible
 
 #-------------------------------------------------------------------------------
 # Clone the repositories and checkout the versions