Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50547

Add support to Gerrit Trigger for WIP and Private changes (new in Gerrit 2.15)

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • gerrit-trigger-plugin
    • None

      Gerrit 2.15, which has just been released, removes the old "Draft" workflow, and replaces it with something new called "WIP" (Work-In-Progress), described in the 2.15 release notes here.

      The Gerrit trigger plugin should continue to support Drafts (for when it's used with a pre-2.51 Gerrit), but also needs to support the new WIP workflow.

      • In the "Trigger on" section, there is currently an option "Exclude Drafts". "Exclude WIP" needs to be added.
      • When we support "Trigger on Draft Published", I guess we need "Trigger on WIP moved to ready" and "Trigger on moved to WIP"

      Similarly , there is a new state called Private which should also be handled.

       

          [JENKINS-50547] Add support to Gerrit Trigger for WIP and Private changes (new in Gerrit 2.15)

          I have "Exclude Drafts" selected in my trigger configuration, and it appears that also applies to WIP changes in Gerrit 2.15 (i.e., WIP changes are not triggered). Or maybe WIP changes don't stream events? Anyhow, the behaviour is correct from my point of view.

           

          Matthew Webber added a comment - I have "Exclude Drafts" selected in my trigger configuration, and it appears that also applies to WIP changes in Gerrit 2.15 (i.e., WIP changes are not triggered). Or maybe WIP changes don't stream events? Anyhow, the behaviour is correct from my point of view.  

          Peter Olsson added a comment -

          For us the biggest issue is that it can't detect when moving from WIP to "normal", or from private to "normal". To get around this issues we had to create a trigger on comment (with regex), so we can add a specific comment to force a trigger to occur.

           

          It would be really nice if the Gerrit plugin could be updated to reflect the current features of Gerrit.

          Peter Olsson added a comment - For us the biggest issue is that it can't detect when moving from WIP to "normal", or from private to "normal". To get around this issues we had to create a trigger on comment (with regex), so we can add a specific comment to force a trigger to occur.   It would be really nice if the Gerrit plugin could be updated to reflect the current features of Gerrit.

          Tom Skrainar added a comment -

          There's an active PR for this (not mine): https://github.com/jenkinsci/gerrit-trigger-plugin/pull/383

          Linking here for folks tracking this issue.

          Tom Skrainar added a comment - There's an active PR for this (not mine): https://github.com/jenkinsci/gerrit-trigger-plugin/pull/383 Linking here for folks tracking this issue.

          mike bayer added a comment -

          > I have "Exclude Drafts" selected in my trigger configuration, and it appears that also applies to WIP changes in Gerrit 2.15 (i.e., WIP changes are not triggered).

           

          i just tried that locally here and WIP changes are triggered even with "exclude drafts" set.

          mike bayer added a comment - > I have "Exclude Drafts" selected in my trigger configuration, and it appears that also applies to WIP changes in Gerrit 2.15 (i.e., WIP changes are not triggered).   i just tried that locally here and WIP changes are triggered even with "exclude drafts" set.

            rsandell rsandell
            mwebber Matthew Webber
            Votes:
            13 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: