From 8bab321b9a1713ac4c2b4bf6814dd4fc4b9f27f4 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Wed, 5 Sep 2018 12:42:01 -0400 Subject: [PATCH] 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 --- shell/jenkins-configure-clouds.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)," -- 2.16.6