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

          Darth Vader created issue -
          Darth Vader made changes -
          Link New: This issue is related to JENKINS-35988 [ JENKINS-35988 ]
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]

          Mark Waite added a comment -

          Since the git plugin doesn't read the contents of Jenkinsfile when performing polling, I'm not sure how it would honor the polling settings inside the Jenkinsfile in the repository. It seems like it would be even more challenging in a repository with more than one branch, since the polling settings might differ between branches within the same repository.

          I wonder if jglick has any ideas how to handle this case and JENKINS-35988 (and others like it).

          Mark Waite added a comment - Since the git plugin doesn't read the contents of Jenkinsfile when performing polling, I'm not sure how it would honor the polling settings inside the Jenkinsfile in the repository. It seems like it would be even more challenging in a repository with more than one branch, since the polling settings might differ between branches within the same repository. I wonder if jglick has any ideas how to handle this case and JENKINS-35988 (and others like it).

          daryl piffre added a comment -

          I'm having the same problem as well.
          Poll still triggers after setting excluded messages/users
          It's kinda important to us and probably others because we use maven-release-plugin, as shown in the example in the snippet generator.

          daryl piffre added a comment - I'm having the same problem as well. Poll still triggers after setting excluded messages/users It's kinda important to us and probably others because we use maven-release-plugin, as shown in the example in the snippet generator.
          Darth Vader made changes -
          Assignee New: Jesse Glick [ jglick ]

          Darth Vader added a comment -

          jglick Any comment on this issue? I can't imagine being the only one with this problem. This is really the only thing preventing us to move to a pipeline/multi-branch workflow. I know that pipelines are the future of Jenkins so we really want to make the switch so we can benefit from all the recent improvements in Jenkins.

          Darth Vader added a comment - jglick Any comment on this issue? I can't imagine being the only one with this problem. This is really the only thing preventing us to move to a pipeline/multi-branch workflow. I know that pipelines are the future of Jenkins so we really want to make the switch so we can benefit from all the recent improvements in Jenkins.

          +1

          For me, it's the polling ignores that are configured in the job itself and not the Jenkinsfile.

          Preston Jennings added a comment - +1 For me, it's the polling ignores that are configured in the job itself and not the Jenkinsfile.

          Mark Waite added a comment -

          prestonj you're describing a condition which has a very different root case compared to the conditions which cause this bug report. Please find an existing bug report which describes cases where a job ignores polling exclusion rules which are defined within the job, or submit a new bug.

          Mark Waite added a comment - prestonj you're describing a condition which has a very different root case compared to the conditions which cause this bug report. Please find an existing bug report which describes cases where a job ignores polling exclusion rules which are defined within the job, or submit a new bug.

          markewaite Understood. I've created a separate defect as I couldn't find anything specific to my case: https://issues.jenkins-ci.org/browse/JENKINS-36836

          Preston Jennings added a comment - markewaite Understood. I've created a separate defect as I couldn't find anything specific to my case: https://issues.jenkins-ci.org/browse/JENKINS-36836

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

              Created:
              Updated: