From: Thanh Ha Date: Fri, 13 Jul 2018 15:11:15 +0000 (-0400) Subject: Pull default USER_DATA_ID from cloud.cfg X-Git-Tag: v0.22.0~4 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F75%2F11775%2F1;p=releng%2Fglobal-jjb.git Pull default USER_DATA_ID from cloud.cfg Sets the default USER_DATA_ID for minion templates to be what is defined in cloud.cfg. If cloud.cfg does not define one then default to "jenkins-init-script". RELENG-1069 Change-Id: I135c9a6c1d0ee11e627a66d1cc87e60eb7db1b20 Signed-off-by: Thanh Ha --- diff --git a/shell/jenkins-configure-clouds.sh b/shell/jenkins-configure-clouds.sh index 0b30c59b..47023f7d 100644 --- a/shell/jenkins-configure-clouds.sh +++ b/shell/jenkins-configure-clouds.sh @@ -166,7 +166,9 @@ get_minion_options() { 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")