Fix RTD Verify job Gerrit Triggers 29/6529/4
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sun, 17 Sep 2017 04:32:10 +0000 (00:32 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 19 Sep 2017 16:48:29 +0000 (12:48 -0400)
The verify job was incorrectly setup as a merge job trigger causing
RTD builds to not trigger as expected.

Change-Id: I2502eff209deb7b077e64c620c77d4ecbfbc9a8e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
.jjb-test/expected-xml/gerrit-rtd-rtd-verify-master
jjb/lf-rtd-jobs.yaml

index 7010633..e102182 100644 (file)
@@ -162,7 +162,12 @@ For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
       <triggerConfigURL/>
       <allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
       <triggerOnEvents>
-        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginChangeMergedEvent/>
+        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
+          <excludeDrafts>false</excludeDrafts>
+          <excludeTrivialRebase>false</excludeTrivialRebase>
+          <excludeNoCodeChange>false</excludeNoCodeChange>
+        </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
+        <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginDraftPublishedEvent/>
         <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
           <commentAddedCommentContains>recheck$</commentAddedCommentContains>
         </com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>
index 6dc3a99..ad1e6af 100644 (file)
 - lf_rtd_common: &lf_rtd_common
     name: lf-rtd-common
     # RTD verify and merge jobs are the same except for their scm, trigger, and
-    # builders definition. This anchor is the common template
-    #
-    # Optional parameters:
-    #     :gerrit_trigger_file_paths: Override file paths which can be used to
-    #         filter which file modifications will trigger a build.
-    #         (default: - compare-type: ANT
-    #                     pattern: '**/*.rst'
-    #                   - compare-type: ANT
-    #                     pattern: '**/conf.py')
+    # builders definition. This anchor is the common template.
 
     ######################
     # Default parameters #
     #         Often the same as the branch. (default: master)
     #     :submodule-recursive: Whether to checkout submodules recursively.
     #         (default: true)
+    #
+    #     :gerrit_verify_triggers: Override Gerrit Triggers.
+    #     :gerrit_trigger_file_paths: Override file paths which can be used to
+    #         filter which file modifications will trigger a build.
+    #         (default: - compare-type: ANT
+    #                     pattern: '**/*.rst'
+    #                   - compare-type: ANT
+    #                     pattern: '**/conf.py')
 
     ######################
     # Default parameters #
     stream: master
     submodule-recursive: true
 
+    gerrit_verify_triggers:
+      - patchset-created-event:
+          exclude-drafts: false
+          exclude-trivial-rebase: false
+          exclude-no-code-change: false
+      - draft-published-event
+      - comment-added-contains-event:
+          comment-contains-value: recheck$
+
     #####################
     # Job Configuration #
     #####################
     triggers:
       - gerrit:
           server-name: '{gerrit-server-name}'
-          trigger-on:
-            - change-merged-event
-            - comment-added-contains-event:
-                comment-contains-value: 'recheck$'
+          trigger-on: '{obj:gerrit_verify_triggers}'
           projects:
             - project-compare-type: 'ANT'
               project-pattern: '{project-pattern}'