summaryrefslogtreecommitdiffstats
path: root/jjb/joid
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
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')
-rw-r--r--jjb/joid/joid-ci-jobs.yml69
-rw-r--r--jjb/joid/joid-deploy.sh48
2 files changed, 71 insertions, 46 deletions
diff --git a/jjb/joid/joid-ci-jobs.yml b/jjb/joid/joid-ci-jobs.yml
index 05064de1f..79262eb61 100644
--- a/jjb/joid/joid-ci-jobs.yml
+++ b/jjb/joid/joid-ci-jobs.yml
@@ -36,27 +36,34 @@
- orange-pod2:
<<: *master
#--------------------------------
-# please check the triggers before enabling any of the controllers!!!
- sdn-controller:
- - 'odl':
- disabled: false
-# commented out below controllers to get Arno scenario settled first
-# - 'nosdn':
-# disabled: true
- - 'onos':
- disabled: false
-# - 'opencontrail':
-# disabled: true
+# new scenario descriptions
+ scenario:
+ - 'os-nosdn-nofeature-noha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-nosdn-nofeature-ha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-odl_l2-nofeature-ha':
+ auto-trigger-name: 'joid-{scenario}-{pod}-trigger'
+ - 'os-odl_l2-nofeature-noha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-onos-nofeature-ha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-onos-nofeature-noha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-ocl-nofeature-ha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
+ - 'os-ocl-nofeature-noha':
+ auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
jobs:
- - 'joid-{sdn-controller}-{pod}-daily-{stream}'
+ - 'joid-{scenario}-{pod}-daily-{stream}'
- 'joid-deploy-{pod}-daily-{stream}'
########################
# job templates
########################
- job-template:
- name: 'joid-{sdn-controller}-{pod}-daily-{stream}'
+ name: 'joid-{scenario}-{pod}-daily-{stream}'
project-type: multijob
@@ -66,10 +73,10 @@
wrappers:
- build-name:
- name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Scenario: $DEPLOY_SCENARIO'
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
triggers:
- - 'joid-{pod}-{sdn-controller}-trigger'
+ - '{auto-trigger-name}'
parameters:
- project-parameter:
@@ -77,17 +84,8 @@
- '{installer}-defaults'
- '{pod}-defaults'
- string:
- name: SDN_CONTROLLER
- default: '{sdn-controller}'
- - string:
name: DEPLOY_SCENARIO
- default: 'none'
-
- scm:
- - git-scm:
- credentials-id: '{ssh-credentials}'
- refspec: ''
- branch: '{branch}'
+ default: '{scenario}'
builders:
- multijob:
@@ -96,7 +94,6 @@
projects:
- name: 'joid-deploy-{pod}-daily-{stream}'
current-parameters: true
- git-revision: true
kill-phase-on: FAILURE
- multijob:
name: functest
@@ -122,7 +119,7 @@
wrappers:
- build-name:
- name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Scenario: $DEPLOY_SCENARIO'
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
- timeout:
timeout: 180
fail: true
@@ -162,26 +159,14 @@
# trigger macros
########################
- trigger:
- name: 'joid-intel-pod5-odl-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-intel-pod5-trigger'
triggers:
- timed: '0 2 * * *'
- trigger:
- name: 'joid-intel-pod6-odl-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-intel-pod6-trigger'
triggers:
- timed: '0 2 * * *'
- trigger:
- name: 'joid-orange-pod2-odl-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-intel-pod5-onos-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-intel-pod6-onos-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-orange-pod2-onos-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-orange-pod2-trigger'
triggers:
- timed: ''
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