-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2018 The Linux Foundation and others.
volume_size=$(get_cfg "$cfg_file" VOLUME_SIZE "")
hardware_id=$(get_cfg "$cfg_file" HARDWARE_ID "")
network_id=$(get_cfg "$cfg_file" NETWORK_ID "")
- user_data_id=$(get_cfg "$cfg_file" USER_DATA_ID "jenkins-init-script")
+
+ udi_default="$(get_cfg "$(dirname $cfg_file)/cloud.cfg" USER_DATA_ID "jenkins-init-script")"
+ user_data_id=$(get_cfg "$cfg_file" USER_DATA_ID "$udi_default")
# Handle Sandbox systems that might have a different cap.
instance_cap=$(get_cfg "$cfg_file" INSTANCE_CAP "null")
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),"