Before starting with a multibranch pipeline using jenkins. Lets first see what is jenkins.

Jenkins: Is a free and open-source automation server or we can say it tool. It helps to automate the parts of software development related to building, testing and deploying, facilitating continuous integration and continuous delivery.

So we can say that jenkins is a tool which is used to create a CI-CD pipeline for our application.

We are not going to discuss about the Jenkins over here in detail . We are going to see how multibranch pipeline can be created using jenkins and how to trigger multibranch pipline automaticaly whenever new commit or pushe’s or pr is generated.

If you hav no idea about jenkins and you want learn , you can refer HERE

Let’s start with the Multibranch Pipeline:

Mutibranch Pipeline:

WHY ?

Let’s first disscuss undersatnd why we need multibranch pipeline. As whenever we create a simple pipeline we are able to work on the single branch that we specify in the pipeline , the default one master. So imagine we have multiple enviroment and need to deploy application on those environment i.e test, develop and production. So in that case will you create the multiple single-branch pipeline ? (i.e one for test, one for develop and master)

Ans: No .

WHAT ?

So the solution for above case is Multibranch pipeline. Multibranch pipeline allows to create a single pipeline for the differant branches. So whenever you hit a particular branch , the pipeline get start to execute for that branch only(i.e execute the stages you specify in your jenkinsfile)

#devops #jenkins #github webhook #multibranch pipeline #webhook trigger

Multibranch Pipeline(With Github-webhook)
5.90 GEEK