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 Setup Self-Hosted Linux Docker Build Agent in Azure DevOps | How to configure Self-Hosted Linux Docker Agents in Azure Pipelines | Create Custom Build Agents in Azure DevOps

  Let us learn how to configure a self-hosted agent using Docker in Azure DevOps pipelines. What is an Agent? An agent is computing infrastr...