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

Pipeline polling ignores special polling rules

    XMLWordPrintable

Details

    Description

      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:

      Attachments

        1. image-2017-07-18-16-03-09-364.png
          19 kB
          Slawomir Demichowicz
        2. image-2018-06-28-18-09-30-343.png
          21 kB
          Xiaohui Cui
        3. image-2018-06-29-14-45-17-341.png
          8 kB
          Xiaohui Cui
        4. image-2018-06-29-15-36-13-977.png
          21 kB
          Xiaohui Cui
        5. pipeline-without-userexclusion-not-working.png
          240 kB
          Allan BURDAJEWICZ
        6. pipeline-with-userexclusion-working.png
          288 kB
          Allan BURDAJEWICZ

        Issue Links

          Activity

            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

            schlitzered 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
            stanislaw_kodzis Stanisław added a comment -

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

            stanislaw_kodzis Stanisław added a comment - Please start work on it. Thank you for fixing this issue, it's pending still.
            markewaite 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.

            markewaite 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 :-/

            schlitzered 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 :-/
            stanislaw_kodzis 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?

             

            stanislaw_kodzis 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?  

            People

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

              Dates

                Created:
                Updated: