Thursday, April 1, 2021

How to create Multibranch pipeline in Jenkins | Multibranch pipeline tutorial

Let us learn how to create multi branch pipeline using Jenkins.

What is Multi-branch pipeline?

 - Automatically create new pipelines for every Git branch in source version control.

- Enables different pipeline implementation for every branch. for e.g let us say you want to have CICD pipeline for master branch and only CI pipeline for develop branch.

- an automatically discover new branches in the source control (GitHub or any SCM) and automatically create a pipeline for that branch.

Watch the steps in YouTube:

Create Jenkinsfile first

Please follow the link above to understand how to create Declarative pipeline - Jenkinsfile.

How to create multibranch pipeline?

 Go to Jenkins. Create a new Item. give a name like myMultiBranchPipelineJob

Click ok

Click branch source,  Add source, Add git.

Give your repo URL which has Jenkinsfile already.


Give your Git repo url, credentials. select credentials from the drop down.

Click apply and Save.

Now the pipeline job will automatically scan and creates pipeline per branch.

No comments:

Post a Comment

DevSecOps Bootcamp Dec 2024 Schedule | DevSecOps & AWS Azure Cloud Coaching by Coach AK | DevSecOps and Cloud Computing Online Classes

Lot of new topics covered like GitHub Actions, GitHub Advanced Security, Helm, Prometheus and Grafana..) The DevOps requirements in the IT m...