Thursday, April 1, 2021

How to enable webhooks for multibranch pipeline in Jenkins | Create webhooks for multibranch pipeline in Jenkins

How to kick start multibranch pipeline in Jenkins pipeline automatically every time you make a code change in your SCM?

Pre-requistes:

We need to install multibranch scan webhook trigger plug-in

Go to Jenkins, Manage Jenkins. Manage plug-ins.

search by  multibranch scan

Once plug-in is installed, let's create a hook.

Please watch the above steps in YouTube channel:

Steps:

Go to Jenkins, click on your existing multibranch pipeline job. Click on configure.

After installing the plug-ins, click on scan multibranch pipeline trigger section. click on scan by webhook. and enter token info.

Copy Jenkins url for configuring webhooks. click on ?

Now create a webhook in GitHub

Go to your git repo, click on settings, Webhooks.enter jenkins url

JENKINS_URL/multibranch-webhook-trigger/invoke?token=myToken123

Click on update webhook. make sure it has configured correctly.

Now if you make a code change, it should trigger multi branch pipeline job.


No comments:

Post a Comment

AWS, Azure Cloud and DevOps Coaching Online Classes | Dec 2021 Schedule

Are you in IT? Tired of your work? Are you not able to make any good progress in your career?  Are you not having a job? Looking for a b...