jenkinsci / jenkinsci/git-plugin
[JENKINS-36195] Pipeline polling ignores special polling rules
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
The git plugin currently offers several special rules on polling:
- Polling ignores commits from certain users
- Polling ignores commits from certain paths (Included/Excluded regions)
- Polling ignores commits with certain messages
- 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:
---
Originally reported by dvader, imported from: Pipeline polling ignores special polling rules
Raw content of original issue
The git plugin currently offers several special rules on polling:
- Polling ignores commits from certain users
- Polling ignores commits from certain paths (Included/Excluded regions)
- Polling ignores commits with certain messages
- 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:
environment
```
Jenkins LTS Latest
Windows 7 x64
```
6 attachments
- [image-2017-07-18-16-03-09-364.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-misc/refs/heads/main/attachments/38935/image-2017-07-18-16-03-09-364.png)
> 
- [image-2018-06-28-18-09-30-343.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/43243/image-2018-06-28-18-09-30-343.png)
> 
- [image-2018-06-29-14-45-17-341.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-misc/refs/heads/main/attachments/43260/image-2018-06-29-14-45-17-341.png)
> 
- [image-2018-06-29-15-36-13-977.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-misc/refs/heads/main/attachments/43261/image-2018-06-29-15-36-13-977.png)
> 
- [pipeline-with-userexclusion-working.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/43589/pipeline-with-userexclusion-working.png)
> 
- [pipeline-without-userexclusion-not-working.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/43588/pipeline-without-userexclusion-not-working.png)
> 
Contributor guide
Assessment
This issue has not been assessed yet.