From 66405edc1d81dd5c8ff4103e8328135d9aef1984 Mon Sep 17 00:00:00 2001 From: David Blaisonneau Date: Tue, 12 Jan 2016 12:23:34 +0100 Subject: joid: Add scenario selector for different sdn controllers + default releng triggers Change-Id: I21854444d997bba876e711433c1b2132cde61c7c Signed-off-by: David Blaisonneau --- jjb/joid/joid-deploy.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) (limited to 'jjb/joid/joid-deploy.sh') diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh index e23afac1c..b50923f98 100644 --- a/jjb/joid/joid-deploy.sh +++ b/jjb/joid/joid-deploy.sh @@ -69,11 +69,51 @@ fi ## Configure Joid deployment ## -# Get juju deployer file -if [ "$HA_MODE" == 'nonha' ]; then - SRCBUNDLE=$WORKSPACE/ci/$SDN_CONTROLLER/juju-deployer/ovs-$SDN_CONTROLLER.yaml +# Based on scenario naming we can get joid options +# naming convention: +# os---[-] +# With parameters: +# controller=(nosdn|odl_l3|odl_l2|onos|ocl) +# No odl_l3 today +# nfvfeature=(kvm|ovs|dpdk|nofeature) +# '_' list separated. +# mode=(ha|noha) +# extrastuff=(none) +# Optional field - Not used today + +IFS='-' read -r -a DEPLOY_OPTIONS <<< "${DEPLOY_SCENARIO}--" +#last -- need to avoid nounset error + +SDN_CONTROLLER=${DEPLOY_OPTIONS[1]} +NFV_FEATURES=${DEPLOY_OPTIONS[2]} +HA_MODE=${DEPLOY_OPTIONS[3]} +EXTRA=${DEPLOY_OPTIONS[4]} + +# Get the juju config path with those options, later we will directly use +# scenario name +case $SDN_CONTROLLER in + odl_l2) + SRCBUNDLE="ovs-odl" + ;; + onos) + SRCBUNDLE="onos" + ;; + ocl) + SRCBUNDLE="contrail" + SDN_CONTROLLER="opencontrail" + ;; + *) + SRCBUNDLE="ovs" + echo "${SDN_CONTROLLER} not in SDN controllers list, using 'nosdn' setting" + SDN_CONTROLLER="nosdn" + ;; + esac +SRCBUNDLE="${WORKSPACE}/ci/${SDN_CONTROLLER}/juju-deployer/${SRCBUNDLE}" +if [ "$HA_MODE" == 'noha' ]; then + SRCBUNDLE="${SRCBUNDLE}.yaml" + HA_MODE == 'nonha' else - SRCBUNDLE=$WORKSPACE/ci/$SDN_CONTROLLER/juju-deployer/ovs-$SDN_CONTROLLER-$HA_MODE.yaml + SRCBUNDLE="${SRCBUNDLE}-${HA_MODE}.yaml" fi # Modify files -- cgit 1.2.3-korg