Use single macro and single trigger word for all every-patch jobs 11/48211/9
authorVratko Polak <vrpolak@cisco.com>
Thu, 1 Dec 2016 13:02:12 +0000 (14:02 +0100)
committerVratko Polak <vrpolak@cisco.com>
Thu, 1 Dec 2016 13:02:12 +0000 (14:02 +0100)
Only "recheck" now works, even "recheck-opendaylight" trigger word was renamed.
Removed obsolete trigger words (and warnings) from docs.
Macro gerrit-trigger-patch-submitted documented.
Its argument names shortened and documented.
Added "files" argument to set file-paths-pattern.
Macro integration-trigger-patch-submitted closely resembles gerrit-trigger-patch-submitted.
Use {project} and {branch} even if only one value makes sense within a file,
so now a verbose value means it is different from the default one.
Fixed docs for {project}-distribution-{stream}.
Added fixmes to builder-verify-python and {project-name}-sonar.
Updated docs on which job is voting on Gerrit.
Patterns for jjb-templates removed.
Minor indentation changes.

Change-Id: I8fda86326af7628e0c385f9a7cb2d2aed1caf881
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
13 files changed:
docs/jenkins.rst
jjb/docs/docs-rtd.yaml
jjb/integration/integration-distribution-jobs.yaml
jjb/integration/integration-macros.yaml
jjb/integration/integration-templates.yaml
jjb/integration/integration-test-jobs.yaml
jjb/opflex/opflex-custom.yaml
jjb/releng-defaults.yaml
jjb/releng-jobs.yaml
jjb/releng-macros.yaml
jjb/releng-templates-java.yaml
jjb/releng-templates.yaml
jjb/sfc/sfc-python.yaml

index 745c31941d0c2bd4c15c761bca078c99b9239a52..9f586dbcb32872cb89c3350e7e6154279c90d9a1 100644 (file)
@@ -80,7 +80,7 @@ Next we will create <new-project>.yaml as follows:
 Replace all instances of <new-project> with the name of your project. This will
 create the jobs with the default job types we recommend for Java projects. If
 your project is participating in the simultanious-release and ultimately will
-be included in the final distribution. We recommend adding the following job
+be included in the final distribution, it is required to add the following job
 types into the job list for the release you are participating.
 
 
@@ -184,7 +184,7 @@ executed Jenkins will finally attach the minion as an actual minion and start
 handling jobs on it.
 
 Pool: ODLRPC
-^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^
 
 .. raw:: html
 
@@ -441,6 +441,9 @@ To validate that JJB was successfully installed you can run this command:
 
     (jjb)$ jenkins-jobs --version
 
+TODO: Explain that only the currently merged jjb/requirements.txt is supported,
+other options described below are for troubleshooting only.
+
 To change the version of JJB specified by `builder/jjb/requirements.txt
 <odl-jjb-requirements.txt_>`_
 to install from the latest commit to the master branch of JJB's git repository:
@@ -547,52 +550,35 @@ patch you wish to trigger against.
 All jobs have a default build-timeout value of 360 minutes (6 hrs) but can be
 overrided via the opendaylight-infra-wrappers' build-timeout property.
 
+TODO: Group jobs into categories: every-patch, after-merge, on-demand, etc.
+TODO: Reiterate that "remerge" triggers all every-patch jobs at once,
+because when only a subset of jobs is triggered, Gerrit forgets valid -1 from jobs outside the subset.
+TODO: Document that only drafts and commit-message-only edits do not trigger every-patch jobs.
+TODO: Document test-{project}-{feature} and test-{project}-all.
+
 .. raw:: html
 
     <table class="table table-bordered">
       <tr class="warning">
         <td><b>Job Template</b><br/>{project}-distribution-{stream}</td>
-        <td><b>Gerrit Trigger</b><br/>test-distribution</td>
       </tr>
       <tr>
         <td colspan="2">
-          This job builds a distrbution against your patch, tiggers distribution sanity CSIT jobs
-          and reports back the results to Gerrit. Leave a comment with trigger keyword above
-          to activate it for a particular patch.
-
-          This job is maintained by the <a href="https://wiki.opendaylight.org/view/Integration/Test">Integration/Test</a>
-          project.
-
-          <div class="admonition note">
-            <p class="first admonition-title">Note</p>
-            <p>
-              Running the "test-distribution" trigger will cause Jenkins to
-              remove it's existing vote if it's already -1 or +1'd a comment.
-              You will need to re-run your verify jobs (recheck) after running
-              this to get Jenkins to put back the correct vote.
-            </p>
-          </div>
+          This job builds a snapshot distribution. This is triggered by successful merge job,
+          so the distribution contains newest project artifacts.
+          This job then triggers subset of sanity CSIT jobs relevant for the project.
         </td>
       </tr>
 
       <tr class="warning">
         <td><b>Job Template</b><br/>{project}-distribution-check-{stream}</td>
-        <td><b>Gerrit Trigger</b><br/>recheck | redistcheck</td>
+        <td><b>Gerrit Trigger</b><br/>recheck</td>
       </tr>
       <tr>
         <td colspan="2">
           This job runs the PROJECT-distribution-check-BRANCH job which is
           building also integration/distribution project in order to run SingleFeatureTest.
-
-          The <b>redistcheck</b> trigger is useful in cases where a project's
-          other jobs passed, however this job failed due to infra problems or
-          intermittent issues. It will retrigger just this job to save time.
-
-          BEWARE: If there were other failed jobs, redistcheck could lead
-          to false Verified+1 vote, risking a merge which breaks other projetcs.
-          Redistcheck is only for committers who are familiar with the risks involved.
-          If in doubt, use the safe trigger word: recheck.
-          Recheck triggers every job involved in verifying latest patch set in the Change.
+          It also performs other check in order to prevent the change to break autorelease.
         </td>
       </tr>
 
@@ -625,10 +611,7 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
           <a href="https://nexus.opendaylight.org">Nexus</a> on completion.
 
           Running the "remerge" trigger is possible before a Change is merged,
-          in which case it will cause Jenkins to remove it's existing vote
-          if it's already -1 or +1'd a comment.
-          You will need to re-run your verify jobs (recheck) after running
-          this to get Jenkins to put back the correct vote.
+          it would still build the actual HEAD. This job does not alter Gerrit votes.
         </td>
       </tr>
 
@@ -660,50 +643,31 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
 
       <tr class="warning">
         <td><b>Job Template</b><br/>{project}-validate-autorelease-{stream}</td>
-        <td><b>Gerrit Trigger</b><br/>recheck | revalidate</td>
+        <td><b>Gerrit Trigger</b><br/>recheck</td>
       </tr>
       <tr>
         <td colspan="2">
           This job runs the PROJECT-validate-autorelease-BRANCH job which is
           used as a quick sanity test to ensure that a patch does not depend on
           features that do not exist in the current release.
-
-          The <b>revalidate</b> trigger is useful in cases where a project's
-          other job passed, however this job failed due to infra problems or
-          intermittent issues. It will retrigger just this job to save time.
-
-          BEWARE: If there were other failed jobs, revalidate could lead
-          to false Verified+1 vote, risking a merge which breaks other projetcs.
-          Revalidate is only for committers who are familiar with the risks involved.
-          If in doubt, use the safe trigger word: recheck.
         </td>
       </tr>
 
       <tr class="warning">
         <td><b>Job Template</b><br/>{project}-verify-{stream}-{maven}-{jdks}</td>
-        <td><b>Gerrit Trigger</b><br/>recheck | reverify</td>
+        <td><b>Gerrit Trigger</b><br/>recheck</td>
       </tr>
       <tr>
         <td colspan="2">
           The Verify job template creates a Gerrit Trigger job that will
           trigger when a new patch is submitted to Gerrit.
           The job only builds the project code (including unit and integration tests).
-
-          The <b>reverify</b> trigger is useful in cases where a project's
-          other jobs passed however this job failed due to infra problems or
-          intermittent issues. It will retrigger just this job to save time.
-
-          BEWARE: If there were other failed jobs, reverify could lead
-          to false Verified+1 vote, risking a merge which breaks other projetcs.
-          Reverify is only for committers who are familiar with the risks involved.
-          If in doubt, use the safe trigger word: recheck.
-          Recheck triggers every job involved in verifying latest patch set in the Change.
         </td>
       </tr>
 
       <tr class="warning">
         <td><b>Job Template</b><br/>{project}-verify-node-{stream}</td>
-        <td><b>Gerrit Trigger</b><br/>recheck | renode</td>
+        <td><b>Gerrit Trigger</b><br/>recheck</td>
       </tr>
       <tr>
         <td colspan="2">
@@ -715,22 +679,12 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
           {nodever} containing the directory relative to the project root
           containing the nodejs package.json and version of node you wish to
           run tests with.
-
-          The <b>renode</b> trigger is useful in cases where a project's
-          other jobs passed, however this job failed due to infra problems or
-          intermittent issues. It will retrigger just this job to save time.
-
-          BEWARE: If there were other failed jobs, renode could lead
-          to false Verified+1 vote, risking a merge which breaks other projetcs.
-          Renode is only for committers who are familiar with the risks involved.
-          If in doubt, use the safe trigger word: recheck.
-          Recheck triggers every job involved in verifying latest patch set in the Change.
         </td>
       </tr>
 
       <tr class="warning">
         <td><b>Job Template</b><br/>{project}-verify-python-{stream} | {project}-verify-tox-{stream}</td>
-        <td><b>Gerrit Trigger</b><br/>recheck | retox</td>
+        <td><b>Gerrit Trigger</b><br/>recheck</td>
       </tr>
       <tr>
         <td colspan="2">
@@ -743,16 +697,15 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
           The 2 template names verify-python & verify-tox are identical and are
           aliases to each other. This allows the project to use the naming that
           is most reasonable for them.
+        </td>
+      </tr>
 
-          The <b>retox</b> trigger is useful in cases where a project's
-          other verify jobs passed, however this job failed due to infra problems or
-          intermittent issues. It will retrigger just this job to save time.
-
-          BEWARE: If there were other failed jobs, retox could lead
-          to false Verified+1 vote, risking a merge which breaks other projetcs.
-          Retox is only for committers who are familiar with the risks involved.
-          If in doubt, use the safe trigger word: recheck.
-          Recheck triggers every job involved in verifying latest patch set in the Change.
+      <tr class="warning">
+        <td><b>Job Template</b><br/>integration-patch-test-{stream}</td>
+        <td><b>Gerrit Trigger</b><br/>test-integration</td>
+      </tr>
+      <tr>
+        <td colspan="2">
         </td>
       </tr>
 
@@ -762,26 +715,13 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
       </tr>
       <tr>
         <td colspan="2">
-          This job runs a full integration test suite against your patch and
-          reports back the results to Gerrit. Leave a comment with trigger
-          keyword above to activate it for a particular patch.
+          This job builds a distribution against your Java patch and triggers distribution sanity CSIT jobs.
+          Leave a comment with trigger keyword above to activate it for a particular patch.
+          This job should not alter Gerrit votes for a given patch.
 
-          It then spawns the list of jobs in csit-list defined
+          The list of CSIT jobs to trigger is defined in csit-list
           <a href="https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=jjb/integration/integration-test-jobs.yaml">here</a>.
 
-          This job is maintained by the <a href="https://wiki.opendaylight.org/view/Integration/Test">Integration/Test</a>
-          project.
-
-          <div class="admonition note">
-            <p class="first admonition-title">Note</p>
-            <p>
-              Running the "test-integration" trigger will cause Jenkins to remove
-              it's existing vote if it's already -1 or +1'd a comment. You will need
-              to re-run your verify job (recheck) after running this to get Jenkins
-              to put back the correct vote.
-            </p>
-          </div>
-
           Some considerations when using this job:
           <ul>
             <li>
index 1a5b7810051b2d5c7df9999a83815dc168141d6c..97f787e1610b617f7ccae882621d51ccc926813f 100644 (file)
@@ -65,6 +65,7 @@
             maven-version: 'mvn33'
 
 - job-template:
+    # FIXME: Describe this job in docs/jenkins.rst
     name: 'docs-verify-rtd-{stream}'
     node: centos7-java-builder-2c-8g
 
             build-timeout: '{build-timeout}'
 
     triggers:
-        - gerrit:
-            server-name: '{server-name}'
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'true'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'true'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'redocs'
-                    # FIXME: Describe this job in docs/jenkins.rst including the BEWARE section.
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: '**'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-                file-paths:
-                    - compare-type: ANT
-                      pattern: docs/**/*.rst
+        - gerrit-trigger-patch-submitted:
+            server: '{server-name}'
+            project: '{project}'
+            branch: '{branch}'
+            files: 'docs/**/*.rst'
         - timed: 'H H * * *'
 
     builders:
index 35827cbd2e5885df119bbc80b517f721207e4f75..79574e48ead332d28b8592d175b566116a909662 100644 (file)
 
     triggers:
         - gerrit-trigger-patch-submitted:
-            server-name: '{server-name}'
-            name: 'integration/distribution'
+            server: '{server-name}'
+            project: '{project}'
             branch: '{branch}'
+            files: '**'
 
     prebuilders:
         - integration-get-bundle-url-root
index a4246f86e63eedaf6a0af0f498b028cd0c7a1fd2..33c3578b650e0453a22895015a5f6b06fffd07d3 100644 (file)
             skip-tag: true
 
 # Macro: integration-trigger-patch-submitted
-# Operation: this macro sets a trigger for patch submitted on a path pattern
-# Used by: {project}-verify-csit-* job templates
-
+# This is a single macro to use for all csit jobs who vote on every (relevant) patch set.
+# Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
+# in order to prevent Jenkins from starting only a subset and still voting Verified+1.
+# Contrary to gerrit-trigger-patch-submitted, this votes +1 also on unstable runs.
+# Arguments:
+#     server: name of gerrit server to listen to
+#     project: pattern to match triggering projects
+#     branch: triggering branch name
+#     files: pattern to match triggering filepaths
 - trigger:
     name: integration-trigger-patch-submitted
     triggers:
         - gerrit:
-            server-name: '{server-name}'
+            server-name: '{server}'
             trigger-on:
                 - patchset-created-event:
                     exclude-drafts: 'true'
                 - draft-published-event
                 - comment-added-contains-event:
                     comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'reverify'
             override-votes: true
             gerrit-build-unstable-verified-value: +1
             gerrit-build-unstable-codereview-value: 0
             projects:
-              - project-compare-type: 'ANT'
-                project-pattern: '{name}'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-                file-paths:
-                  - compare-type: 'ANT'
-                    pattern: '{pattern}'
+                - project-compare-type: 'ANT'
+                  project-pattern: '{project}'
+                  branches:
+                      - branch-compare-type: 'ANT'
+                        branch-pattern: '**/{branch}'
+                  file-paths:
+                      - compare-type: 'ANT'
+                        pattern: '{files}'
 
 # Macro: integration-csit-only
 # Operation: this macro sets a trigger on reverse job list
index 3ba167e347b3ab4e283f51ffebd3c06b5fc8c666..33b19af970141e4ed214d34533ec132c229ecc88 100644 (file)
 
     triggers:
         - integration-trigger-patch-submitted:
-            server-name: '{server-name}'
-            name: 'integration/test'
+            server: '{server-name}'
+            project: 'integration/test'
             branch: 'master'
-            pattern: 'csit/suites/{project}/**'
+            files: 'csit/suites/{project}/**'
 
     builders:
         - integration-copy-ssh-keys
 
     triggers:
         - integration-trigger-patch-submitted:
-            server-name: '{server-name}'
-            name: 'integration/test'
+            server: '{server-name}'
+            project: 'integration/test'
             branch: 'master'
-            pattern: 'csit/suites/{project}/**'
+            files: 'csit/suites/{project}/**'
 
     builders:
         - integration-copy-ssh-keys
index 71e2897b12cc7f79b6ccb1ebbf8a03baf4ae0dda..b98a33c65d9bfbdb2baeb8b98b437ce914c1f32c 100644 (file)
 
     triggers:
         - integration-trigger-patch-submitted:
-            server-name: '{server-name}'
-            name: 'integration/test'
+            server: '{server-name}'
+            project: '{project}'
             branch: 'master'
-            pattern: 'csit/libraries/*'
+            files: 'csit/libraries/*'
 
     builders:
         - integration-copy-ssh-keys
index cc5861c34863422ef84bf375fd57e774a41db26f..294e3fb7356a04fb7149986c1c23e3f17c82c765 100644 (file)
@@ -3,8 +3,6 @@
     jobs:
         - 'opflex-verify-{stream}'
         - 'opflex-merge-{stream}'
-#        - 'opflex-daily-{stream}'
-#        - 'opflex-distribution-{stream}'
 
     stream:
         - carbon:
 
     triggers:
         - gerrit-trigger-patch-submitted:
-            server-name: '{server-name}'
-            name: 'opflex'
+            server: '{server-name}'
+            project: '{project}'
             branch: '{branch}'
+            files: '**'
 
     builders:
         - opflex-build:
index 4b8ba08b1e397411167b4c1ca2cdcfadc8f7a225..2299b1d489f5a6e4bdddc1992b0f36f072245c64 100644 (file)
@@ -19,7 +19,7 @@
     archive-artifacts: ''
     branch: master
 
-   # CSIT images configuration
+    # CSIT images configuration
     controller-image: 'centos7-java-builder-2c-4g'
     openstack-image: 'centos7-devstack-2c-8g'
     mininet-image: 'ubuntu-trusty-mininet-2c-2g'
index c25d4796b291015b61919a3c1ba631e31359f424..b17cd9cec69930c4f39c814714034c4261a358b6 100644 (file)
 
     project-type: freestyle
     archive-artifacts: '**/*.log'
-    project: 'releng/builder'
     build-timeout: '60'
+    # The following two values are only specified here
+    # so that code blocks look similar to other projects.
+    project: 'releng/builder'
+    branch: 'master'
 
 - job-template:
     name: builder-verify-jjb
             build-timeout: '{build-timeout}'
 
     triggers:
-        - gerrit:
-            server-name: '{server-name}'
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'true'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'true'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: 'releng/builder'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-                file-paths:
-                    - compare-type: ANT
-                      pattern: jjb/**
-                    - compare-type: ANT
-                      pattern: jjb-templates/**
+        - gerrit-trigger-patch-submitted:
+            server: '{server-name}'
+            project: '{project}'
+            branch: '{branch}'
+            files: 'jjb/**'
 
     builders:
         - shell: |
         - opendaylight-infra-shiplogs:
             maven-version: 'mvn33'
 
+# FIXME: Migrate to {project-name}-verify-python-{stream} or delete this entirely,
+#        as there are zero python files (aside docs/conf.py) in releng/builder.
 - job-template:
     name: builder-verify-python
     node: centos7-java-builder-2c-8g
             build-timeout: '{build-timeout}'
 
     triggers:
-        - gerrit:
-            server-name: '{server-name}'
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'true'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'true'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: 'releng/builder'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-                file-paths:
-                    - compare-type: ANT
-                      pattern: scripts/**
-
+        - gerrit-trigger-patch-submitted:
+            server: '{server-name}'
+            project: '{project}'
+            branch: '{branch}'
+            files: 'scripts/**'
 
     builders:
         - shell: |
                 file-paths:
                     - compare-type: ANT
                       pattern: jjb/**
-                    - compare-type: ANT
-                      pattern: jjb-templates/**
 
     builders:
         - shell: |
             build-timeout: '{build-timeout}'
 
     triggers:
-        - gerrit:
-            server-name: '{server-name}'
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'true'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'true'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'reverify'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: '{project}'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-                file-paths:
-                    - compare-type: ANT
-                      pattern: 'packer/**'
+        - gerrit-trigger-patch-submitted:
+            server: '{server-name}'
+            project: '{project}'
+            branch: '{branch}'
+            files: 'packer/**'
 
     builders:
         - packer-validate:
index c9b7a8f6e1878dc755d8ca222f27f93ff27260d3..f13bef94192cdf1c42a9f7fb90e569329ef9d36d 100644 (file)
             timeout: 360
             fail: true
 
-# Used only by opflex-verify-{stream} and {project-name}-verify-{stream}-{maven}-{jdks}
+# This is a single macro to use for all jobs who vote on every (relevant) patch set.
+# Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
+# in order to prevent Jenkins from starting only a subset and still voting Verified+1.
+# Arguments:
+#     server: name of gerrit server to listen to
+#     project: pattern to match triggering projects
+#     branch: triggering branch name
+#     files: pattern to match triggering filepaths
 - trigger:
     name: gerrit-trigger-patch-submitted
     triggers:
         - gerrit:
-            server-name: '{server-name}'
+            server-name: '{server}'
             trigger-on:
                 - patchset-created-event:
                     exclude-drafts: 'true'
                 - draft-published-event
                 - comment-added-contains-event:
                     comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'reverify'
             projects:
-              - project-compare-type: 'ANT'
-                project-pattern: '{name}'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-
+                - project-compare-type: 'ANT'
+                  project-pattern: '{project}'
+                  branches:
+                      - branch-compare-type: 'ANT'
+                        branch-pattern: '**/{branch}'
+                  file-paths:
+                      - compare-type: 'ANT'
+                        pattern: '{files}'
+
+# TODO: Unify argument names across gerrit-trigger-* macros.
 - trigger:
     name: gerrit-trigger-patch-merged
     triggers:
                 - comment-added-contains-event:
                     comment-contains-value: 'remerge'
             projects:
-              - project-compare-type: 'ANT'
-                project-pattern: '{name}'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
+                - project-compare-type: 'ANT'
+                  project-pattern: '{name}'
+                  branches:
+                      - branch-compare-type: 'ANT'
+                        branch-pattern: '**/{branch}'
             skip-vote:
                 successful: true
                 failed: true
             gerrit-build-unstable-codereview-value: 0
             gerrit-build-notbuilt-codereview-value: 0
 
+# TODO: Unify argument names across gerrit-trigger-* macros.
 - trigger:
     name: gerrit-trigger-patch-sonar
     triggers:
index d0c10aa2ac8d1836cc55f2526377725a87342543..9d580ad9b2c018ebbd95a8d1ee2351d713cc41d8 100644 (file)
             build-timeout: '60'
 
     triggers:
-        - gerrit:
-            server-name: '{server-name}'
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'true'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'true'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'redistcheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: '{project}'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-            skip-vote:
-                successful: false
-                failed: false
-                unstable: false
-                notbuilt: false
+        - gerrit-trigger-patch-submitted:
+            server: '{server-name}'
+            project: '{project}'
+            branch: '{branch}'
+            files: '**'
 
     builders:
         - maven-target:
         - gerrit-trigger-patch-sonar:
             server-name: '{server-name}'
             name: '{project}'
+            # FIXME: Make sure this does not alter Gerrit votes, then update docs.
 
     builders:
         - jacoco-nojava-workaround
             build-timeout: '{build-timeout}'
 
     triggers:
-        - gerrit:
-            server-name: '{server-name}'
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'true'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'true'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'revalidate'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: '{project}'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-                file-paths:
-                    - compare-type: ANT
-                      pattern: '**/*.xml'
+        - gerrit-trigger-patch-submitted:
+            server: '{server-name}'
+            project: '{project}'
+            branch: '{branch}'
+            files: '**/*.xml'
 
     builders:
         - jacoco-nojava-workaround
 
     triggers:
         - gerrit-trigger-patch-submitted:
-            server-name: '{server-name}'
-            name: '{project}'
+            server: '{server-name}'
+            project: '{project}'
             branch: '{branch}'
+            files: '**'
 
     builders:
         - jacoco-nojava-workaround
index d6102cf622c01a0e1ee4858c2d7ab244fe1ee7b8..b56d6d5e009c5fd231c89944922b65e4eb70b82c 100644 (file)
             build-timeout: '{build-timeout}'
 
     triggers:
-        - gerrit:
-            server-name: '{server-name}'
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'true'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'true'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'retox'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: '{project}'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-                file-paths:
-                    - compare-type: ANT
-                      pattern: '{toxdir}/**'
+        - gerrit-trigger-patch-submitted:
+            server: '{server-name}'
+            project: '{project}'
+            branch: '{branch}'
+            files: '{toxdir}/**'
 
     builders:
         - shell: |
             build-timeout: '{build-timeout}'
 
     triggers:
-        - gerrit:
-            server-name: '{server-name}'
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'true'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'true'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'renode'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: '{project}'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-                file-paths:
-                    - compare-type: ANT
-                      pattern: '{nodedir}/**'
+        - gerrit-trigger-patch-submitted:
+            server: '{server-name}'
+            project: '{project}'
+            branch: '{branch}'
+            files: '{nodedir}/**'
 
     builders:
         - shell: |
index 45c1b34219325722c2ef2cb2a89e03d59a12d0dd..cd1849e8db9795f202e81d224a517b2e6baab001 100644 (file)
             build-timeout: '{build-timeout}'
 
     triggers:
-        - gerrit:
-            server-name: '{server-name}'
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'true'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'true'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'reverify'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: 'sfc'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-                file-paths:
-                    - compare-type: ANT
-                      pattern: sfc-py/**
+        - gerrit-trigger-patch-submitted:
+            server: '{server-name}'
+            project: '{project}'
+            branch: '{branch}'
+            files: 'sfc-py/**'
 
     builders:
         - shell: |