From 38f7e0e5a63228585159892b4a48468d110093e4 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Thu, 12 Jul 2018 13:38:03 -0400 Subject: [PATCH] Pull default KEY_PAIR_NAME from cloud.cfg Sets the default KEY_PAIR_NAME for minion templates to be what is defined in cloud.cfg. If cloud.cfg does not define one then default to "jenkins-ssh". Issue: RELENG-1066 Change-Id: I72bddf861174139048e1843a3631b3998ac32bef Signed-off-by: Thanh Ha --- shell/jenkins-configure-clouds.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shell/jenkins-configure-clouds.sh b/shell/jenkins-configure-clouds.sh index 3b8312e3..0b30c59b 100644 --- a/shell/jenkins-configure-clouds.sh +++ b/shell/jenkins-configure-clouds.sh @@ -179,7 +179,10 @@ get_minion_options() { security_groups=$(get_cfg "$cfg_file" SECURITY_GROUPS "default") availability_zone=$(get_cfg "$cfg_file" AVAILABILITY_ZONE "") start_timeout=$(get_cfg "$cfg_file" START_TIMEOUT "600000") - key_pair_name=$(get_cfg "$cfg_file" KEY_PAIR_NAME "jenkins-ssh") + + kpn_default="$(get_cfg "$(dirname $cfg_file)/cloud.cfg" KEY_PAIR_NAME "jenkins-ssh")" + key_pair_name=$(get_cfg "$cfg_file" KEY_PAIR_NAME "$kpn_default") + num_executors=$(get_cfg "$cfg_file" NUM_EXECUTORS "1") jvm_options=$(get_cfg "$cfg_file" JVM_OPTIONS "") fs_root=$(get_cfg "$cfg_file" FS_ROOT "/w") -- 2.16.6