In this section, we will learn about the multibranch pipeline job in Jenkins. This is one of the new features added to Jenkins release 2.x.
The Multibranch pipeline allows you to automatically create a pipeline for each branch on your source control repository. This is depicted in the following screenshot. A Multibranch pipeline works using a Jenkinsfile that is stored along with your source code inside a version control repository. A Jenkinsfile is nothing but a pipeline script that defines your CI pipeline:
Auto-generated pipeline for a new branch
In addition to that, the Multibranch pipeline is designed to trigger a build whenever there is a new code change on any of the branches on your Git/GitHub repository. This is depicted in the following screenshot:
Usage of multibranch pipeline for continuous integration