From: Thanh Ha Date: Thu, 7 Jun 2018 02:29:49 +0000 (-0400) Subject: DO NOT fail if global-vars-.sh is not configured X-Git-Tag: v0.21.0~20^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=c6c8d6b91093ba59ea780f95683d1b5e067e374c;p=releng%2Fglobal-jjb.git 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 --- 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"