dovetail: conditional steps to run against specific scenarios 13/34813/2
authorMatthewLi <matthew.lijun@huawei.com>
Tue, 16 May 2017 03:05:12 +0000 (23:05 -0400)
committerMatthewLi <matthew.lijun@huawei.com>
Tue, 16 May 2017 06:48:26 +0000 (02:48 -0400)
JIRA: DOVETAIL-432

1, the community CI resource is limited, for dovetail CI job,
there's no need to run against all scenarios, by now,
nosdn-nofeature-ha odl_l2-bgpvpn-ha odl_l2-nofeature-ha is enough.
2, jenkins conditional plugin will be used.
   plugin should be installed
   https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin
3, take compass as an example to see if it works

Change-Id: Ib23835cbf8801c36e35e088cd0d8bf2d6380e81a
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
jjb/compass4nfv/compass-ci-jobs.yml

index 61845ac..7cd7348 100644 (file)
                 build-step-failure-threshold: 'never'
                 failure-threshold: 'never'
                 unstable-threshold: 'FAILURE'
-        #dovetail only master by now, not sync with A/B/C branches
-        #here the stream means the SUT stream, dovetail stream is defined in its own job
-        - trigger-builds:
-            - project: 'dovetail-compass-{pod}-proposed_tests-{stream}'
-              current-parameters: false
-              predefined-parameters:
-                DEPLOY_SCENARIO={scenario}
-              block: true
-              same-node: true
-              block-thresholds:
-                build-step-failure-threshold: 'never'
-                failure-threshold: 'never'
-                unstable-threshold: 'FAILURE'
+        # dovetail only master by now, not sync with A/B/C branches
+        # here the stream means the SUT stream, dovetail stream is defined in its own job
+        # only run on os-(nosdn|odl_l2)-(nofeature|bgpvpn)-ha scenario
+        - conditional-step:
+            condition-kind: regex-match
+            regex: os-(nosdn|odl_l2)-(nofeature|bgpvpn)-ha
+            label: ${scenario}
+            steps:
+                - trigger-builds:
+                    - project: 'dovetail-compass-{pod}-proposed_tests-{stream}'
+                      current-parameters: false
+                      predefined-parameters:
+                        DEPLOY_SCENARIO={scenario}
+                      block: true
+                      same-node: true
+                      block-thresholds:
+                      build-step-failure-threshold: 'never'
+                      failure-threshold: 'never'
+                      unstable-threshold: 'FAILURE'
 
 - job-template:
     name: 'compass-deploy-{pod}-daily-{stream}'