Monday, February 18, 2019

How to Configure webhooks in GitHub | How to trigger Jenkins jobs instantly? - GitHub Webhooks Example

Webhooks allows developers to triggers jobs in CI server (such as Jenkins) for every code changes.

Pre-Requistes:

Make sure you install GitHub integration plug-in in Jenkins

1. Go to Jenkins, Create a job. If you already have a existing job, click on configure. Go to build triggers section and choose the below option - GitHub hook trigger for GitScm pooling.


2. Now go to GitHub, choose your repository. Click on settings, Webhooks.

3. Click on Add web hook.

4. Go Jenkins, copy the URL from the browser--> http://jenkins_public_dns_name:8080

5. Now enter Jenkins URL, select just push event, click on active. Click on Add webhook
6. Now go and make some code changes in your repo in GitHub

7. If you look in Jenkins, you will see job is getting triggered immediately.


You can watch these steps as video on my YouTube channel as well:

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...