summaryrefslogtreecommitdiffstats
path: root/xci/scripts/vm
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-10-03 16:51:53 +0100
committerMarkos Chandras <mchandras@suse.de>2017-10-03 16:54:24 +0100
commitf1be44648ccb6ff9a73c953fa7838d0a177b8d93 (patch)
tree60a7788397481b410f42dd5f9d3701f29858f545 /xci/scripts/vm
parent00972f7af0385b1072782dc14205abf6a00734a7 (diff)
xci: scripts: start-new-vm.sh: Set JENKINS_HOME on local runs
If we are creating a new virtual machine for local testing, then we should set JENKINS_HOME since some playbooks use this variable to determine if the deployment happens on a CI or not. That script aims to simulate a CI deployment so it should have this variable set. Change-Id: I1165c8b2cd467ba92fcf6f6c178a69b07834894e Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/scripts/vm')
-rwxr-xr-xxci/scripts/vm/start-new-vm.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh
index faadb87d..673d2b70 100755
--- a/xci/scripts/vm/start-new-vm.sh
+++ b/xci/scripts/vm/start-new-vm.sh
@@ -10,6 +10,11 @@
set -e
+# If we are not on real Jenkins CI, then just set this variable so we can pretend
+# we are since various playbooks use this variable to determine if they are being
+# executed on a CI or not.
+export JENKINS_HOME="${JENKINS_HOME:-${HOME}}"
+
export DEFAULT_XCI_TEST=${DEFAULT_XCI_TEST:-false}
grep -q -i ^Y$ /sys/module/kvm_intel/parameters/nested || { echo "Nested virtualization is not enabled but it's needed for XCI to work"; exit 1; }