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

How to Implement CICD Pipeline using GitHub Actions | GitHub Actions Tutorials | GitHub Actions CICD Pipeline | How to Deploy Java WAR file using GitHub Actions to Tomcat Server

Please find steps for Deploying Java WAR file to Tomcat using GitHub Actions: Pre-requisites: Make sure Tomcat is up and running Make sure J...