loading...

Jenkins Multibranch Pipeline

raghwendrasonu profile image Raghwendra Sonu ・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: https://github.com/sonucogni/Jenkins_Pipeline_Demo/
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: https://dev.to/raghwendrasonu/create-jenkins-pipeline-with-an-example-3p7j

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.

Posted on by:

raghwendrasonu profile

Raghwendra Sonu

@raghwendrasonu

Automation Testing expert with diverse tools and technologies. Expertise in Web Automation, Mobile Automation, Performance Testing, API (WebServices Testing), Automation Testing Frameworks.

Discussion

markdown guide