summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xxci/files/xci-destroy-env.sh (renamed from xci/infra/bifrost/scripts/destroy-env.sh)0
-rw-r--r--xci/infra/bifrost/infra-provision.sh4
-rwxr-xr-xxci/xci-deploy.sh11
3 files changed, 11 insertions, 4 deletions
diff --git a/xci/infra/bifrost/scripts/destroy-env.sh b/xci/files/xci-destroy-env.sh
index 9d53dc15..9d53dc15 100755
--- a/xci/infra/bifrost/scripts/destroy-env.sh
+++ b/xci/files/xci-destroy-env.sh
diff --git a/xci/infra/bifrost/infra-provision.sh b/xci/infra/bifrost/infra-provision.sh
index f847e66d..9c3adfc2 100644
--- a/xci/infra/bifrost/infra-provision.sh
+++ b/xci/infra/bifrost/infra-provision.sh
@@ -12,10 +12,6 @@ BIFROST_ROOT_DIR="$(dirname $(realpath ${BASH_SOURCE[0]}))"
echo "Info: Starting provisining VM nodes using openstack/bifrost"
echo "-------------------------------------------------------------------------"
-# We are using sudo so we need to make sure that env_reset is not present
-sudo sed -i "s/^Defaults.*env_reset/#&/" /etc/sudoers
-cd $BIFROST_ROOT_DIR
-sudo -E bash ./scripts/destroy-env.sh
cd $BIFROST_ROOT_DIR/playbooks/
ansible-playbook ${XCI_ANSIBLE_PARAMS} -i "localhost," bootstrap-bifrost.yml
cd ${XCI_CACHE}/repos/bifrost
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index fb678ec5..80b10106 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -85,6 +85,9 @@ unset user_local_dev_vars local_user_var
# register our handler
trap submit_bug_report ERR
+# We are using sudo so we need to make sure that env_reset is not present
+sudo sed -i "s/^Defaults.*env_reset/#&/" /etc/sudoers
+
#-------------------------------------------------------------------------------
# Log info to console
#-------------------------------------------------------------------------------
@@ -103,6 +106,14 @@ echo "openstack/bifrost version: $OPENSTACK_BIFROST_VERSION"
echo "-------------------------------------------------------------------------"
#-------------------------------------------------------------------------------
+# Clean up environment
+#-------------------------------------------------------------------------------
+echo "Info: Cleaning up previous XCI artifacts"
+echo "-------------------------------------------------------------------------"
+sudo -E bash files/xci-destroy-env.sh
+echo "-------------------------------------------------------------------------"
+
+#-------------------------------------------------------------------------------
# Install ansible on localhost
#-------------------------------------------------------------------------------
echo "Info: Installing Ansible from pip"