xci: scripts: start-new-vm.sh: Set JENKINS_HOME on local runs 19/44119/1
authorMarkos Chandras <mchandras@suse.de>
Tue, 3 Oct 2017 15:51:53 +0000 (16:51 +0100)
committerMarkos Chandras <mchandras@suse.de>
Tue, 3 Oct 2017 15:54:24 +0000 (16:54 +0100)
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>
xci/scripts/vm/start-new-vm.sh

index faadb87..673d2b7 100755 (executable)
 
 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; }