How it works...

The GitHub Branch Souce plugin will allow Jenkins to periodically scan the whole specified GitHub organization, and for every repository it will check all the branches and PRs, and if they contain a file called Jenkinsfile they will be automatically built following the directives contained in the Jenkinsfile itself.

This is quite a powerful paradigm and it allows to keep under version control not only the code of the project but also the instructions on how to build, test, and even release it in the same code base.

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.