-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
In Github Pull Request Builder plugin, It is possible to create whitelist for which PR build automatically. For non whitelisted users admin must approve that PR to be build. Then comment can trigger build for that PR. Unfortunately it isn't compatible with Pipeline.
So it will be nice to have those functionality on github-branch-source-plugin.
- is blocked by
-
JENKINS-45502 Add concept of "interesting" to SCMHead and SCMRevision
-
- Open
-
- is related to
-
JENKINS-36195 Pipeline polling ignores special polling rules
-
- Open
-
This requires the concept of interesting branches and revisions to be introduced to the SCM API plugin.
Once that is present then you should be able to mark commits from non-whitelisted users as non-interesting and hence the branch-api plugin suppress automatic building of those commits
In the interim, the best workaround you can use is to leverage trust for non-origin forks. Builds from non-trusted users will build using the Jenkinsfile from the target branch. Then in your target branch Jenkinsfile you can have the very first thing be a check against the whitelist of users and abort the build if the user is not in the whitelist (you'd probably like to have JENKINS-27092 to allow you to do this with the error step so you could get the natural NOT_BUILT status... but it's not critical if you just need to ensure that the whitelist is enforced)