update doctor CI job 03/25003/2
authorRyota MIBU <r-mibu@cq.jp.nec.com>
Mon, 28 Nov 2016 08:46:44 +0000 (08:46 +0000)
committerRyota MIBU <r-mibu@cq.jp.nec.com>
Mon, 28 Nov 2016 09:18:52 +0000 (09:18 +0000)
Doctor has an experimental CI job. It has three parts (builders in
jjb / runners in CI). The main job will trigger two runner jobs which
will run 'test/run.sh' in the same CI pod with different inspector
(sample and congress). While executing those two children jobs, the
main job will block CI pipline on that pod. In order to avoide deadlock
and sequencial runner job execution, we set two pipelines for the pod.
But, it still allow deadlock when we trigger two main jobs at the same
time.

This patch simplify the job definition by splitting two runner jobs
and removing the main job.

Change-Id: I4fadd58cc827a41927940c38cf05ed105c6f243c
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
jjb/doctor/doctor.yml

index 4958ca2..5bf34ac 100644 (file)
@@ -7,12 +7,12 @@
         - master:
             branch: '{stream}'
             gs-pathname: ''
-            docker_tag: 'master'
+            docker-tag: 'master'
             disabled: false
         - colorado:
             branch: 'stable/{stream}'
             gs-pathname: '/{stream}'
-            docker_tag: 'stable'
+            docker-tag: 'stable'
             disabled: false
 
     installer:
             slave-label: 'ool-virtual1'
             pod: 'ool-virtual1'
 
+    inspector:
+        - 'sample'
+        - 'congress'
+
     jobs:
         - 'doctor-verify-{stream}'
-        - 'doctor-verify-{installer}-{stream}'
+        - 'doctor-verify-{installer}-{inspector}-{stream}'
 
 - job-template:
     name: 'doctor-verify-{stream}'
@@ -68,7 +72,7 @@
         - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh"
 
 - job-template:
-    name: 'doctor-verify-{installer}-{stream}'
+    name: 'doctor-verify-{installer}-{inspector}-{stream}'
 
     node: '{slave-label}'
 
             name: OS_CREDS
             default: /home/jenkins/openstack.creds
             description: 'OpenStack credentials'
+        - '{installer}-defaults'
         - '{slave-label}-defaults'
+        - functest-suite-parameter:
+            FUNCTEST_SUITE_NAME: 'doctor'
+            TESTCASE_OPTIONS: '-e INSPECTOR_TYPE={inspector} -v $WORKSPACE:$HOME/opnfv/repos/doctor'
+        - string:
+            name: DEPLOY_SCENARIO
+            default: 'os-nosdn-nofeature-ha'
+        - string:
+            name: DOCKER_TAG
+            default: '{docker-tag}'
+            description: 'Tag to pull docker image'
+        - functest-parameter:
+            gs-pathname: '{gs-pathname}'
+            CI_DEBUG: 'true'
 
     scm:
         - gerrit-trigger-scm:
                 notbuilt: true
 
     builders:
-        - trigger-builds:
-          - project: 'functest-{installer}-{pod}-suite-{stream}'
-            current-parameters: true
-            predefined-parameters: |
-              CI_DEBUG=true
-              FUNCTEST_SUITE_NAME=doctor
-              DEPLOY_SCENARIO=os-nosdn-nofeature-ha
-              TESTCASE_OPTIONS=-e INSPECTOR_TYPE=sample -v $WORKSPACE:$HOME/opnfv/repos/doctor
-            block: true
-            same-node: true
-          - project: 'functest-{installer}-{pod}-suite-{stream}'
-            current-parameters: true
-            predefined-parameters: |
-              CI_DEBUG=true
-              FUNCTEST_SUITE_NAME=doctor
-              DEPLOY_SCENARIO=os-nosdn-nofeature-ha
-              TESTCASE_OPTIONS=-e INSPECTOR_TYPE=congress -v $WORKSPACE:$HOME/opnfv/repos/doctor
-            block: true
-            same-node: true
+        - description-setter:
+            description: "POD: $NODE_NAME"
+        - 'functest-suite-builder'
 
     publishers:
         - postbuildscript: