Is there a way to configure a build configuration in a way that it may run only for certain branches. I'm not only talking about automatic triggers, I also want to prevent users from manually triggering a run for other branches.
Asked
Active
Viewed 916 times
2 Answers
2
Under the version control settings for a build configuration you can add branch filters:

infojolt
- 5,244
- 3
- 40
- 82
0
To prevent users from manually triggering a build, you need to set user permissions. This can be done under Administration > users/groups > group name/username > roles
.
If you want them to only view the project, you can assign the role Project Viewer.
You can also make your own roles with your own set of rules by clicking Administration > roles
.

Jeff Gruenbaum
- 364
- 6
- 21
-
Actually, manually triggering is also prefvented by infojolt's answer. – D.R. Jun 02 '20 at 14:44
-
Not necessarily, say for example you have two parameters being passed to your vcs root: the %vcs.git.branch.default% and the %vcs.git.branch.pattern%. You can then specify which branch you want to build off by changing those parameters. Granted, if you set the branch filter to exclude certain branches, the build will fail, but the build will still kick off. – Jeff Gruenbaum Jun 02 '20 at 14:55