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/
I will create a Multibranch Jenkins job with configuration as shown in below image.
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.
I hope this was helpful.
Top comments (0)