From: Thanh Ha Date: Thu, 12 Jul 2018 17:38:03 +0000 (-0400) Subject: Pull default KEY_PAIR_NAME from cloud.cfg X-Git-Tag: v0.22.0~6 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=38f7e0e5a63228585159892b4a48468d110093e4;p=releng%2Fglobal-jjb.git 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 --- 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")