From f1be44648ccb6ff9a73c953fa7838d0a177b8d93 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 3 Oct 2017 16:51:53 +0100 Subject: 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 --- xci/scripts/vm/start-new-vm.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xci/scripts/vm') 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; } -- cgit