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 <thanh.ha@linuxfoundation.org>
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),"