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

Comment Added event does not work

    XMLWordPrintable

Details

    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

          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

          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
          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)
          
          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)
          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

          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

          ry:

          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...)

          pedersen Björn Pedersen added a comment - ry : 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...)
          ry Ry Jones added a comment -

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

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

          People

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

            Dates

              Created:
              Updated: