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

How to Configure GitHub Advanced Security for Azure DevOps | How to Perform Security scan for Azure Repos using GitHub Advanced Security

GitHub Advanced Security for Azure DevOps brings the  secret scanning, dependency scanning  and  CodeQL code scanning  solutions already ava...