summaryrefslogtreecommitdiffstats
path: root/jjb/joid/joid-deploy.sh
diff options
context:
space:
mode:
authorDavid Blaisonneau <david.blaisonneau@orange.com>2016-01-12 12:23:34 +0100
committerDavid Blaisonneau <david.blaisonneau@orange.com>2016-01-13 15:14:02 +0100
commit66405edc1d81dd5c8ff4103e8328135d9aef1984 (patch)
treee7308c869e0b9449184674255dca85e12a4a92bc /jjb/joid/joid-deploy.sh
parent2a315ee3d2523b55618e93c0ba546b7b28cdddf9 (diff)
joid: Add scenario selector for different sdn controllers + default releng triggers
Change-Id: I21854444d997bba876e711433c1b2132cde61c7c Signed-off-by: David Blaisonneau <david.blaisonneau@orange.com>
Diffstat (limited to 'jjb/joid/joid-deploy.sh')
-rw-r--r--jjb/joid/joid-deploy.sh48
1 files changed, 44 insertions, 4 deletions
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-<controller>-<nfvfeature>-<mode>[-<extrastuff>]
+# 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