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

Comment Added event does not work

    Details

    • Similar Issues:

      Description

      We recently upgraded our jenkins server from version 2.28 to 2.30. Gerrit trigger(v2.22.0) on comments added Contains Regex does not seem to work ever since the upgrade. Other gerrit triggers seems to be working flawlessly.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Robert Sandell
          Path:
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/events/PluginCommentAddedContainsEvent.java
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/25b4597276f70fa22bbd1154c18c48b5798666ce
          Log:
          Merge pull request #312 from bpedersen2/39010

          JENKINS-39010 CommentAddedRegex: Input is a multiline message

          Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/31a31de744ec...25b4597276f7

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/events/PluginCommentAddedContainsEvent.java http://jenkins-ci.org/commit/gerrit-trigger-plugin/25b4597276f70fa22bbd1154c18c48b5798666ce Log: Merge pull request #312 from bpedersen2/39010 JENKINS-39010 CommentAddedRegex: Input is a multiline message Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/31a31de744ec...25b4597276f7
          Hide
          d3viation Komail Kanjee added a comment - - edited

          Is this issue resolved? Trying with this regular expression but its not triggering the job: 

          (?i)^(Patch Set [0-9]+:)?( [\w\\+-]*)*(\n\n)?\s*(recheck)
          
          Show
          d3viation Komail Kanjee added a comment - - edited Is this issue resolved? Trying with this regular expression but its not triggering the job:  (?i)^(Patch Set [0-9]+:)?( [\w\\+-]*)*(\n\n)?\s*(recheck)
          Hide
          ry Ry Jones added a comment - - edited

          This is still an issue in Jenkins 2.89.4, gerrit-trigger-plugin 2.27.5. Specifically:

          Job 0 triggers on new patchset, leaves a comment "DO BUILD 1" in gerrit when it completes.

          Job 1 triggers on comment regex of "DO BUILD 1". Does not trigger, even though comment appears in Gerrit

          However: if a user manually places a comment "DO BUILD 1" on patchset, Job 1 is triggered correctly.

          see below

          Show
          ry Ry Jones added a comment - - edited This is still an issue in Jenkins 2.89.4, gerrit-trigger-plugin 2.27.5. Specifically: Job 0 triggers on new patchset, leaves a comment "DO BUILD 1" in gerrit when it completes. Job 1 triggers on comment regex of "DO BUILD 1". Does not trigger, even though comment appears in Gerrit However: if a user manually places a comment "DO BUILD 1" on patchset, Job 1 is triggered correctly. see below
          Hide
          pedersen Björn Pedersen added a comment -

          Ry Jones:

          I think this actually excpected behaviour: The plugin filters it's own  comments to avoid trigger-loops. 

          One solution: use the gerrit ssh cli to post the  review 'DO BUILD 1' with another account to force triggering, or just trigger the other job directly (there are different ways to do that in jenkins...)

          Show
          pedersen Björn Pedersen added a comment - Ry Jones : I think this actually excpected behaviour: The plugin filters it's own  comments to avoid trigger-loops.  One solution: use the gerrit ssh cli to post the  review 'DO BUILD 1' with another account to force triggering, or just trigger the other job directly (there are different ways to do that in jenkins...)
          Hide
          ry Ry Jones added a comment -

          Björn Pedersen you are correct. What we did to work around this is change the email address the plugin uses to post comments.

          Show
          ry Ry Jones added a comment - Björn Pedersen you are correct. What we did to work around this is change the email address the plugin uses to post comments.

            People

            • Assignee:
              rsandell rsandell
              Reporter:
              afahd fahd arshad
            • Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated: