X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fjenkins-configure-global-vars.sh;h=2ebdceea7acc01334ce25aacdd8542a3ffb6cb9b;hb=808efc4efb54ec63105aa67a4c82c7245f5180ad;hp=6e6402326c94194901b5679f0d1d94ff85019d92;hpb=1d1aaf33f079ee4f51dfce68e8f5592a649947ca;p=releng%2Fglobal-jjb.git diff --git a/shell/jenkins-configure-global-vars.sh b/shell/jenkins-configure-global-vars.sh index 6e640232..2ebdceea 100644 --- a/shell/jenkins-configure-global-vars.sh +++ b/shell/jenkins-configure-global-vars.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -l # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2018 The Linux Foundation and others. @@ -20,13 +20,18 @@ echo "---> jenkins-configure-global-vars.sh" GROOVY_SCRIPT_FILE="jjb/global-jjb/jenkins-admin/set_global_properties.groovy" -# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091 -source "/tmp/v/lftools/bin/activate" 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"