From 46d1da1c4d060c2f64c14d3d62fe285cfc9aa28f Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Fri, 13 Jul 2018 11:11:15 -0400 Subject: [PATCH] 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 --- shell/jenkins-configure-clouds.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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") -- 2.16.6