From 8f980959f3a4cb421e80cb9d876cdb9c39285150 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Thu, 17 Oct 2019 14:56:04 +0200 Subject: [PATCH] cloud-infra: Dynamically generate slave label 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 | 5 +++-- jjb/cloud-infra/determine-scenario.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jjb/cloud-infra/cloud-infra-verify-engine.yaml b/jjb/cloud-infra/cloud-infra-verify-engine.yaml index 837af99a..b6e58970 100644 --- a/jjb/cloud-infra/cloud-infra-verify-engine.yaml +++ b/jjb/cloud-infra/cloud-infra-verify-engine.yaml @@ -66,14 +66,15 @@ 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: @@ -101,7 +102,7 @@ - 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 diff --git a/jjb/cloud-infra/determine-scenario.sh b/jjb/cloud-infra/determine-scenario.sh index 14950f4f..10fea570 100644 --- a/jjb/cloud-infra/determine-scenario.sh +++ b/jjb/cloud-infra/determine-scenario.sh @@ -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 -- 2.25.1