-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 2.332.1
We have a Multi-Branch Pipeline job for our GitHub project where we would like for the job to only be triggered for a couple of named branches and all Pull Requests.
Unfortunately, no matter what we do, we are triggering builds for all branches and all PRs. There are several negative side-effects of this but one is that all PRs end up with two builds attached to them (one for the branch which is triggered when the branch is pushed and one for the PR when it is created from the branch).
We have the following settings in the github-branch-source-plugin:
Behavior:
- Discover branches: Exclude branches that are also filed as PRs
- Discover pull requests from origin: Merging the pull request...
- Discover pull requests from forks: Merging the pull request...
Property strategy: All branches get the same properties
Build strategies:
- Change Requests
- Named Branches
- Names
- Exact match: main
- Exact match: release/3.3
- Exact match: release/3.4
- Names
Have we misunderstood the configuration needed to achieve this goal or is it not possible without polluting our Jenkinsfile with where blocks for each stage to disable each stage for unwanted branches?