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 {
split(v1, a, /\:/);
- if (a[2] == '$test_value') {
- exit (a[2] == '$test_value') ? 0 : 1
+ if (a[2] == '"$test_value"') {
+ exit (a[2] == '"$test_value"') ? 0 : 1
}
else {
- exit (a[2] '$operator' '$test_value') ? 0 : 1
+ exit (a[2] '"$operator"' '"$test_value"') ? 0 : 1
}
}'
}
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}"