From: Thanh Ha Date: Wed, 5 Sep 2018 16:42:01 +0000 (-0400) Subject: Strip out trailing metadata from version X-Git-Tag: v0.25.0~20 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F61%2F12461%2F1;p=releng%2Fglobal-jjb.git Strip out trailing metadata from version When manually building maven plugins maven puts in some metadata like "2.38-SNAPSHOT (private-9853d407-zxiiro)" which throws off the version_ge function as it does not know how to handle a version with a space in the name. This change strips out only the leading version ignoring everything after a space. Change-Id: I02f0397ae5627f65638a456ba2f1304dd9a16de9 Signed-off-by: Thanh Ha --- diff --git a/shell/jenkins-configure-clouds.sh b/shell/jenkins-configure-clouds.sh index 070a94e7..456b825a 100644 --- a/shell/jenkins-configure-clouds.sh +++ b/shell/jenkins-configure-clouds.sh @@ -193,7 +193,8 @@ get_minion_options() { launcher_factory=$(get_launcher_factory "$connection_type") OS_PLUGIN_VER="$(lftools jenkins plugins list \ - | grep -i 'OpenStack Cloud Plugin' | awk -F':' '{print $2}')" + | grep -i 'OpenStack Cloud Plugin' \ + | awk -F':' '{print $2}' | awk -F' ' '{print $1}')" if version_ge "$OS_PLUGIN_VER" "2.35"; then if [ ! -z "$volume_size" ]; then echo " new BootSource.VolumeFromImage(\"$image_name\", $volume_size),"