From: Thanh Ha Date: Wed, 6 Jun 2018 01:39:01 +0000 (-0400) Subject: Consolidate keypair default names to jenkins-ssh X-Git-Tag: v0.21.0~25 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=efc1f452019d36fa2973f9276b91facada2ba5e8;p=releng%2Fglobal-jjb.git Consolidate keypair default names to jenkins-ssh BREAKING-CHANGE: Minion SSH default KeyPair name is now jenkins-ssh Either override in cloud.cfg or rename the Credential in Jenkins. This is an attempt to consolidate all our different instances of the ssh-keypair name all over the place. By default we will consolidate on `jenkins-ssh` as the default keypair name. This can be overrided of course and applies to the following config locations in Jenkins / CIMAN: 1. defaults.yaml's `jenkins-ssh-credential` 2. Jenkins > Credentials > ID > jenkins-ssh 3. jenkins-config/clouds controlling both local private key name and public key name inside the cloud which now need to match On a new infra if we are not overriding any values all of these should accept the default value of `jenkins-ssh`. Change-Id: I9fe691bbb59d81a1e861261be33cbda00de7a061 Signed-off-by: Thanh Ha --- diff --git a/docs/configuration.rst b/docs/configuration.rst index b15c19ff..4c597cc6 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -65,7 +65,7 @@ Example Gerrit Infra: name: global # lf-infra defaults - jenkins-ssh-credential: opendaylight-jenkins-ssh + jenkins-ssh-credential: jenkins-ssh gerrit-server-name: OpenDaylight lftools-version: '<1.0.0' mvn-site-id: opendaylight-site diff --git a/shell/jenkins-configure-clouds.sh b/shell/jenkins-configure-clouds.sh index cd50da09..3f7dd6a5 100644 --- a/shell/jenkins-configure-clouds.sh +++ b/shell/jenkins-configure-clouds.sh @@ -158,7 +158,7 @@ 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") + key_pair_name=$(get_cfg "$cfg_file" KEY_PAIR_NAME "jenkins-ssh") 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") @@ -181,7 +181,7 @@ get_minion_options() { echo " $num_executors," echo " \"$jvm_options\"," echo " \"$fs_root\"," - echo " new LauncherFactory.SSH(\"jenkins\", \"\")," + echo " new LauncherFactory.SSH(\"$key_pair_name\", \"\")," echo " $retention_time" }