DEV Community


Jenkins Multibranch Pipeline

Raghwendra Sonu
Automation Testing expert with diverse tools and technologies. Expertise in Web Automation, Mobile Automation, Performance Testing, API (WebServices Testing), Automation Testing Frameworks.
・1 min read

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.

Discussion (0)