From: Eric Ball Date: Mon, 27 Jan 2020 15:54:44 +0000 (+0000) Subject: Merge "Call "lftools jenkins" after credentials are set" X-Git-Tag: v0.51.0~19 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=8285615e111cae15f76eba24e5720068d16e778f;hp=9a2bedb4c6783b211f34cc414f8e69f40b0070ae;p=releng%2Fglobal-jjb.git Merge "Call "lftools jenkins" after credentials are set" --- diff --git a/releasenotes/notes/fix-configure-clouds-e71e71c12c614de0.yaml b/releasenotes/notes/fix-configure-clouds-e71e71c12c614de0.yaml new file mode 100644 index 00000000..1a686676 --- /dev/null +++ b/releasenotes/notes/fix-configure-clouds-e71e71c12c614de0.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + Call "lftools jenkins" after credentials are set to fix failures due to the + call being made without credentials being set first. The previous method + did not require credentials, so the failure was introduced when we switched + to using lftools. The os_plugin_version variable is not needed before the + JENKINS_USER and JENKINS_PASSWORD are set, so no other changes + are necessary. diff --git a/shell/jenkins-configure-clouds.sh b/shell/jenkins-configure-clouds.sh index 405ecedf..e5dba546 100644 --- a/shell/jenkins-configure-clouds.sh +++ b/shell/jenkins-configure-clouds.sh @@ -46,9 +46,6 @@ silos="${jenkins_silos:-jenkins}" set -eu -o pipefail -os_plugin_version="$(lftools jenkins plugins list \ - | grep -i 'OpenStack Cloud Plugin')" - testversion() { local current_val="$1" operator="$2" test_value="$3" awk -vv1="$current_val" -vv2="$test_value" 'BEGIN { @@ -319,6 +316,11 @@ for silo in $silos; do export JENKINS_USER export JENKINS_PASSWORD + # JENKINS_{URL,USER,PASSWORD} env vars are required for the "lftools jenkins + # plugins list" call + os_plugin_version="$(lftools jenkins plugins list \ + | grep -i 'OpenStack Cloud Plugin')" + echo "-----> Groovy script $script_file" for cloud in "${clouds[@]}"; do cfg_dir="${cloud}"