Use include-regions to limit RTD build paths
[releng/global-jjb.git] / shell / jenkins-configure-clouds.sh
index c2df091..3f7dd6a 100644 (file)
 # Configuration is read from $WORKSPACE/jenkins-config/clouds/openstack/$cloud/cloud.cfg
 #
 # Requirements: lftools must be installed to /tmp/v/lftools
+#
 # Parameters:
+#
+#     WORKSPACE:  The path to the local ci-management repository.
 #     jenkins_silos:  Space separated list of Jenkins silos to push
-#                     configuration to. (default: jenkins)
+#                     configuration to. This must match a configuration section
+#                     in the config file located at
+#                     ~/.config/jenkins_jobs/jenkins_jobs.ini config file.
+#                     (default: jenkins)
+#
+# Local testing can be performed by exporting the parameters "WORKSPACE" and
+# "jenkins_silos" as environment variables. For example:
+#
+#    export WORKSPACE=/tmp/ci-management
+#    export jenkins_silos=sandbox
+#    bash ./jjb/global-jjb/shell/jenkins-configure-clouds.sh
 echo "---> jenkins-configure-clouds.sh"
 
 if [ ! -d "$WORKSPACE/jenkins-config/clouds" ]; then
@@ -145,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")
@@ -168,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"
 }