Trigger a Jenkins Build on Every Code Push Event

Configure GitHub project

Go to your GitHub repository settings and click on Webhooks. Click on add a webhook.

In payload URL, add your jenkins installation URL + ‘/github-webhook/’. For example if my jenkins is running at, I’ll add Disable SSL verification. Select send me everything or you can select only push events. and lastly check the box which says Active.

Configure Jenkins project

Go to your jenkins project configuration. Let’s say I have a project ak-project, I’ll go to

Go to Build Triggers tab.

Check the option which says, GitHub hook trigger for GITScm polling.

Save your changes.

You’re all done. Now push some code to GitHub repository and see the magic in Jenkins… Enjoy!