From c6c8d6b91093ba59ea780f95683d1b5e067e374c Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Wed, 6 Jun 2018 22:29:49 -0400 Subject: [PATCH] DO NOT fail if global-vars-.sh is not configured All configurations in jenkins-cfg job should be optional. If a project does not configure a setting then skip it and continue. Issue: RELENG-962 Change-Id: I386a6371ce3f1ff1b5cc024760f6d316d5008d63 Signed-off-by: Thanh Ha --- shell/jenkins-configure-global-vars.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shell/jenkins-configure-global-vars.sh b/shell/jenkins-configure-global-vars.sh index 6e640232..af36d100 100644 --- a/shell/jenkins-configure-global-vars.sh +++ b/shell/jenkins-configure-global-vars.sh @@ -27,6 +27,13 @@ silos="${jenkins_silos:-jenkins}" set -eu -o pipefail for silo in $silos; do + if [ ! -f "$WORKSPACE/jenkins-config/global-vars-$silo.sh" ]; then + echo "WARN: jenkins-config/global-vars-$silo.sh does not exist. Skipping cloud management..." + echo "We highly recommend setting up global-vars-$silo.sh to manage the Jenkins global variables." + echo "Refer to https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/jjb/lf-ci-jobs.html#global-environment-variables for details." + continue + fi + set +x # Ensure that no other scripts add `set -x` and print passwords echo "Configuring $silo" -- 2.16.6