DEV Community

Raghwendra Sonu
Raghwendra Sonu

Posted on

Jenkins Multibranch Pipeline

This will automatically trigger job execution for every branch, you have for your project repository. This solves the problem of creating new build for every new branch we create on the fly.
Multibranch Pipeline is a plugin in Jenkins. In this article we will see how to create multibranch pipeline. Ensure that Pipeline: Multibranch plugin is installed in Your Jenkins instance.
Once the plugin is available in Jenkins, We are going to create a multibranch pipeline job in Jenkins.
As you see my project at GitHub is having two branches:
Alt Text

I will create a Multibranch Jenkins job with configuration as shown in below image.
Alt Text

Also, ensure that you have created Jenkinsfile as this is a pipeline job. You can read about Jenkinsfile creation here:

Once done, save the job configuration and build. Jenkins will automatically scan for all the branches and will execute job for all the branches.
Alt Text

I hope this was helpful.

Top comments (0)