cloud-infra: Dynamically generate slave label 41/2641/2
authorFatih Degirmenci <fdegir@gmail.com>
Thu, 17 Oct 2019 12:56:04 +0000 (14:56 +0200)
committerFatih Degirmenci <fdegir@gmail.com>
Thu, 17 Oct 2019 13:03:08 +0000 (15:03 +0200)
We have multiple parameters that we use to decide the slave
to provision from OpenStack.
  - cloud name: cloud where the slave is provisioned from.
      could either be city or xerces.
  - slave type: type of the slave.
      could either be jumphost (smaller) or vpod (larger).
  - distro: distro to provision the slave with.
      could either be ubuntu1804 or centos7.

Change-Id: Iafff9c015519896f35ff058db08e24ad351d0f95

jjb/cloud-infra/cloud-infra-verify-engine.yaml
jjb/cloud-infra/determine-scenario.sh

index 837af99aac90995fe9e145d644f5d069f540ca9c..b6e58970c4cc4ab447f64af697aa039e1a3c0ee3 100644 (file)
           notbuilt: true
     cloud:
       - city:
-          slave-label: 'city-jumphost-onap-ubuntu1804'
           openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap'
 
     type:
       - virtual:
           provisioner-type: 'bifrost'
+          slave-type: 'vpod'
       - cloud:
           provisioner-type: 'heat'
+          slave-type: 'jumphost'
 
     phase:
       - deploy:
       - nordix-gerrit-parameters
       - label:
           name: SLAVE_LABEL
-          default: '{slave-label}'
+          default: '{cloud}-{slave-type}-{distro}'
           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
       - string:
           name: DISTRO
index 14950f4f188cc9d94f0f39d3b3756da497fe7394..10fea5706dc96e1aca070641bb6b2032c3ee96e2 100644 (file)
@@ -69,7 +69,7 @@ function determine_scenario() {
   echo "Info: Processing $GERRIT_PROJECT patchset $GERRIT_REFSPEC"
   if [[ "$GERRIT_PROJECT" == "infra/engine" ]]; then
     echo "Info: Setting INSTALLER_TYPE and DEPLOY_SCENARIO to defaults for project $GERRIT_PROJECT patchset $GERRIT_REFSPEC"
-    export PROVISIONER_TYPE=bifrost
+    export PROVISIONER_TYPE=$PROVISIONER_TYPE
     export INSTALLER_TYPE=kubespray
     export DEPLOY_SCENARIO=k8-calico-nofeature
     write_change_metadata