Jenkins and github integration using webhooks

Reading Time: 2 minutes

TL;DR

As github has deprecated service integration feature, I had to reconfigure jenkins integration using webhooks. As this is not straightforward to do, this blog post will help you to save some time if you are using github/jenkins integration.

Precondition

Jenkins github plugin.

Github Personal Access Token.

Lets go down the rabbit hole. You first need to create github personal access token for user that has access to github repository. In my case, that was my github account.

Hmmm, possible github UX issue, this is 4th level depth to get to this feature. Step 5 shows that github knows web security.

Again, proof that github understands web security.

Jenkins Global credentials

Using github token, you will create jenkins global credential.

My note on jenkins UX. Its free, and I understand that team do not have much resources. But credentials UX is really messed up.

Jenkins Github settings

Note rate limit. You have 5000 requests per hour for all github integrations, not just Jenkins.

Github repository webhook

If that is not the case, click on latest delivery that will contain HTTP request/response.

Jenkins job build trigger.

Check

Resources

I used those two in order to decript all steps in proper order:

by

Originally published at blog.tentamen.eu on June 23, 2018.

Founder of Tentamen, software testing agency.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store