summaryrefslogtreecommitdiffstats
path: root/jjb/xci/xci-cleanup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/xci/xci-cleanup.sh')
-rwxr-xr-xjjb/xci/xci-cleanup.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/jjb/xci/xci-cleanup.sh b/jjb/xci/xci-cleanup.sh
index ce84830aa..51a863da2 100755
--- a/jjb/xci/xci-cleanup.sh
+++ b/jjb/xci/xci-cleanup.sh
@@ -14,11 +14,15 @@
# what you are doing.
#----------------------------------------------------------------------
+# Need to cover macros with and without parameters
+VM_NAME=$DISTRO
+VM_NAME+=_xci_vm
+
# skip the deployment if the patch doesn't impact the deployment
if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then
echo "Skipping the deployment!"
exit 0
fi
-sudo virsh destroy ${DISTRO}_xci_vm || true
-sudo virsh undefine ${DISTRO}_xci_vm || true
+sudo virsh destroy $VM_NAME || true
+sudo virsh undefine $VM_NAME || true