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

Pipeline polling ignores special polling rules

      The git plugin currently offers several special rules on polling:

      1. Polling ignores commits from certain users
      2. Polling ignores commits from certain paths (Included/Excluded regions)
      3. Polling ignores commits with certain messages
      4. Branch specifier

      For example:
      checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'UserExclusion', excludedUsers: 'dvader'], [$class: 'PathRestriction', excludedRegions: 'One/.*', includedRegions: 'Test/.*'], [$class: 'MessageExclusion', excludedMessage: '.\\[maven-release-plugin
      ].
      ']], gitTool: 'Default', submoduleCfg: [], userRemoteConfigs: [[credentialsId: '...', url: 'ssh://git@bitbucket.org/test.git']]])

      If a commit is committed to bitbucket.org/test.git, regardless of the user, location, branch or message, the step that includes the checkout will be run.

      Similar issue has been reported in:

          [JENKINS-36195] Pipeline polling ignores special polling rules

          Szymon Seget added a comment -

          Hi, any updates? I need this feature to work. kishore_1269 are you trying to fix it?

          Szymon Seget added a comment - Hi, any updates? I need this feature to work. kishore_1269 are you trying to fix it?

          Carol Lim added a comment - - edited

          Hi, does anyone able to get the excludedRegions and includedRegions to work in a pipeline job?

          Carol Lim added a comment - - edited Hi, does anyone able to get the excludedRegions and includedRegions to work in a pipeline job?

          Andrii added a comment -

          +1, I have the same problem. Build of pipeline job is triggered despite of commit to path that specified in "Polling ignore commits in certain path" in job configuration (not inside Jenkinsfile)

           

          Andrii added a comment - +1, I have the same problem. Build of pipeline job is triggered despite of commit to path that specified in "Polling ignore commits in certain path" in job configuration (not inside Jenkinsfile)  

          the assigned user kishore_1269 seems to have been inactive since november 2019. is there someone else who can pic up this issue?

          Stephan Schultchen added a comment - the assigned user kishore_1269 seems to have been inactive since november 2019. is there someone else who can pic up this issue?

          Mark Waite added a comment -

          schlitzered I'm not aware of anyone intending to work on this issue. As far as I'm concerned, the git plugin should not apply its settings to pipeline polling because pipeline polling is handled in the branch API and by extensions of the branch API.

          If you use a multibranch pipeline, then you can limit which jobs are created through the basic branch build strategies plugin and can limit the paths with the pipeline multibranch build strategies plugin.

          Mark Waite added a comment - schlitzered I'm not aware of anyone intending to work on this issue. As far as I'm concerned, the git plugin should not apply its settings to pipeline polling because pipeline polling is handled in the branch API and by extensions of the branch API. If you use a multibranch pipeline, then you can limit which jobs are created through the basic branch build strategies plugin and can limit the paths with the pipeline multibranch build strategies plugin .

          markewaite i am not using a Multibranch Pipeline, i am using a normal pipeline. and afaik this should work, it is just a bug, also normal pipeline jobs are not deprecated, so i do not see why i should switch.

           

          never the less, me and a colleague took a look at the problem, and we found the issue, and created a pull request & a another ticket:

          https://github.com/jenkinsci/git-plugin/pull/1046

          https://issues.jenkins.io/browse/JENKINS-64902

           

          so hopefully this issue will soon be fixed upstream

          Stephan Schultchen added a comment - markewaite i am not using a Multibranch Pipeline, i am using a normal pipeline. and afaik this should work, it is just a bug, also normal pipeline jobs are not deprecated, so i do not see why i should switch.   never the less, me and a colleague took a look at the problem, and we found the issue, and created a pull request & a another ticket: https://github.com/jenkinsci/git-plugin/pull/1046 https://issues.jenkins.io/browse/JENKINS-64902   so hopefully this issue will soon be fixed upstream

          Stanisław added a comment -

          Please start work on it. Thank you for fixing this issue, it's pending still.

          Stanisław added a comment - Please start work on it. Thank you for fixing this issue, it's pending still.

          Mark Waite added a comment -

          stanislaw_kodzis I don't plan to start work on this issue.

          If you'd like to continue the work that was started by schlitzered, you can use the code that was shared in https://github.com/jenkinsci/git-plugin/pull/1046 . If those changes resolve the issue for you, that would be a great reason to submit a pull request containing the changes. If those changes do not resolve the issue for you, the experience working with those changes may guide you to an improvement that will resolve the issue for you.

          Mark Waite added a comment - stanislaw_kodzis I don't plan to start work on this issue. If you'd like to continue the work that was started by schlitzered , you can use the code that was shared in https://github.com/jenkinsci/git-plugin/pull/1046 . If those changes resolve the issue for you, that would be a great reason to submit a pull request containing the changes. If those changes do not resolve the issue for you, the experience working with those changes may guide you to an improvement that will resolve the issue for you.

          don´t use my pull request, i have no clue about java, and just tried something, this pull request never worked.

          I myself, in the meantime, switched to Github Actions. the plugin situation with jenkins is a mess. way too much unmaintained code everywhere, and bugs that never get fixed :-/

          Stephan Schultchen added a comment - don´t use my pull request, i have no clue about java, and just tried something, this pull request never worked. I myself, in the meantime, switched to Github Actions. the plugin situation with jenkins is a mess. way too much unmaintained code everywhere, and bugs that never get fixed :-/

          Stanisław added a comment -

          Thanks for the info Mark and Stephan.

          So the GIT plugin needs to be rewritten from scratch? Becase now it too messy to refactor?

           

          Stanisław added a comment - Thanks for the info Mark and Stephan. So the GIT plugin needs to be rewritten from scratch? Becase now it too messy to refactor?  

            Unassigned Unassigned
            dvader Darth Vader
            Votes:
            108 Vote for this issue
            Watchers:
            109 Start watching this issue

              Created:
              Updated: