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

extend changeMerged event with merge commit

    XMLWordPrintable

Details

    Description

      as found here:
      https://bugs.launchpad.net/openstack-ci/+bug/929723
      and
      http://code.google.com/p/gerrit/issues/detail?id=2785

      The changeMerged event provides the merged patchset information of a review/change that was merged to its destination branch.

      Can this event be extended, or a new event created to include the SHA of the merge commit that was written/exists on the destination branch so that an event listener, like the Jenkins Gerrit Trigger Plugin, could fetch the specified branch and rewind to the specific SHA for a per-review-on-the-branch build trigger?

      The refUpdated event has essentially a rev-list of individual commits with no indication of which were added as a result of review merge

      Attachments

        Activity

          georgey21 George Young created issue -
          georgey21 George Young made changes -
          Field Original Value New Value
          Issue Type Bug [ 1 ] Improvement [ 4 ]
          jamiecooper Jamie Cooper added a comment -

          I have a patch for the gerrit-trigger plugin to implement support for this feature. Recent versions of Gerrit supply a 'newRev' field as part of the change-merged event, and I have implemented parsing of this field to create a build-time environment variable named GERRIT_MERGED_REVISION.

          Jenkins can then use this variable to build the merged code, rather than the individual patchset that was submitted.

          My question is: How do I go about submitting my patch back to the plugin?

          jamiecooper Jamie Cooper added a comment - I have a patch for the gerrit-trigger plugin to implement support for this feature. Recent versions of Gerrit supply a 'newRev' field as part of the change-merged event, and I have implemented parsing of this field to create a build-time environment variable named GERRIT_MERGED_REVISION. Jenkins can then use this variable to build the merged code, rather than the individual patchset that was submitted. My question is: How do I go about submitting my patch back to the plugin?
          rsandell rsandell added a comment -

          Submit a pull request

          rsandell rsandell added a comment - Submit a pull request
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 156737 ] JNJira + In-Review [ 179373 ]
          georgey21 George Young added a comment -

          Looks like a commit by Jan Dohl achieves this result, found in plugin version gerrit-trigger-2.21.0 which creates the GERRIT_NEWREV Jenkins job variable when listening to Gerrit v2.11 streaming ref_updated or change_merged events with the new JSON field new_rev field

          georgey21 George Young added a comment - Looks like a commit by Jan Dohl achieves this result, found in plugin version gerrit-trigger-2.21.0 which creates the GERRIT_NEWREV Jenkins job variable when listening to Gerrit v2.11 streaming ref_updated or change_merged events with the new JSON field new_rev field
          georgey21 George Young added a comment -

          I assume this has been tested so look forward to using this when we upgrade our Gerrit to v2.11

          georgey21 George Young added a comment - I assume this has been tested so look forward to using this when we upgrade our Gerrit to v2.11
          georgey21 George Young made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]

          People

            rsandell rsandell
            georgey21 George Young
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: