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

Pipeline polling ignores special polling rules

    Details

    • Similar Issues:

      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

          Issue Links

            Activity

            dvader Darth Vader created issue -
            dvader Darth Vader made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-35988 [ JENKINS-35988 ]
            markewaite Mark Waite made changes -
            Assignee Mark Waite [ markewaite ]
            dvader Darth Vader made changes -
            Assignee Jesse Glick [ jglick ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 172856 ] JNJira + In-Review [ 184814 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-36836 [ JENKINS-36836 ]
            jglick Jesse Glick made changes -
            Component/s workflow-job-plugin [ 21716 ]
            Component/s workflow-scm-step-plugin [ 21717 ]
            Component/s pipeline [ 21692 ]
            jglick Jesse Glick made changes -
            Assignee Jesse Glick [ jglick ]
            demee Slawomir Demichowicz made changes -
            Attachment image-2017-07-18-16-01-33-798.png [ 38933 ]
            demee Slawomir Demichowicz made changes -
            Attachment image-2017-07-18-16-02-28-808.png [ 38934 ]
            demee Slawomir Demichowicz made changes -
            Attachment image-2017-07-18-16-03-09-364.png [ 38935 ]
            markewaite Mark Waite made changes -
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            demee Slawomir Demichowicz made changes -
            Attachment image-2017-07-18-16-01-33-798.png [ 38933 ]
            demee Slawomir Demichowicz made changes -
            Attachment image-2017-07-18-16-02-28-808.png [ 38934 ]
            stephenconnolly Stephen Connolly made changes -
            Link This issue is related to JENKINS-44611 [ JENKINS-44611 ]
            markewaite Mark Waite made changes -
            Link This issue is duplicated by JENKINS-46059 [ JENKINS-46059 ]
            nafiux Ignacio Ocampo made changes -
            Issue Type Improvement [ 4 ] Bug [ 1 ]
            nafiux Ignacio Ocampo made changes -
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            andrey_klyukin Andrey Klyukin made changes -
            Comment [ According to the comments above:

            [~jlehtnie]
            {quote}At least _Included/Excluded regions_ actually works ok if you also specify _Disable Remote Poll_, e.g. ...
            {quote}
            and

            [~killdash9]
            {quote}Yes. polling REGION inclusion/exclusion is working. The USER inclusion/exclusion is not working ...
            {quote}
            But REGION inclusion/exclusion is not working for me.

            Pipeline: 
            {code:java}
            pipeline {
                agent any

                stages {
                    stage("Checkout repo"){
                        steps {
                            checkout([
                                $class: 'GitSCM',
                                branches: [[name: '*/master']],
                                doGenerateSubmoduleConfigurations: false,
                                extensions: [[$class: 'DisableRemotePoll'], [$class: 'PathRestriction', excludedRegions: '', includedRegions: 'ggg/.*']], submoduleCfg: [], userRemoteConfigs: [[url: 'ssh://git@myrepo/testrepo.git']]])
                        }
                    }
                    stage("Next step"){
                        steps {
                            sh 'echo "Testing"'
                        }
                    }
                }
            }
            {code}
            "Poll SCM" parameter is checked

            When I make changes to the repository (not in "ggg/" directory) job is triggered, although it should not.

            [Jenkins ver. 2.92|https://jenkins.io/]

            Git plugin 3.6.4

            Can anyone help? ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-1919 (Web Link)" [ 18511 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-1409 (Web Link)" [ 18708 ]
            scui Xiaohui Cui made changes -
            Attachment image-2018-06-28-18-09-30-343.png [ 43243 ]
            scui Xiaohui Cui made changes -
            Attachment image-2018-06-29-14-45-17-341.png [ 43260 ]
            scui Xiaohui Cui made changes -
            Attachment image-2018-06-29-15-36-13-977.png [ 43261 ]
            shauli10 Shaul Lahav made changes -
            Assignee SHAUL LAHAV [ shauli10 ]
            allan_burdajewicz Allan BURDAJEWICZ made changes -
            shauli10 Shaul Lahav made changes -
            Assignee Shaul Lahav [ shauli10 ] Mark Waite [ markewaite ]
            markewaite Mark Waite made changes -
            Assignee Mark Waite [ markewaite ]

              People

              • Assignee:
                Unassigned
                Reporter:
                dvader Darth Vader
              • Votes:
                90 Vote for this issue
                Watchers:
                95 Start watching this issue

                Dates

                • Created:
                  Updated: