GitHub Commit Hooks HOWTO

If you would like builds to start immediately after a commit, you can use GitHub post-commit hooks to ping Jenkins to queue up a build whenever someone pushes to your repository.

There are just a few steps needed:

Install the GitHub plugin.

Go to Manage Jenkins -> Manage Plugins -> Available [tab].

Choose the github plugin, and click the "Install Button" at the bottom of the page.

Once the plugin is installed, restart Jenkins as directed.

Next, configure the GitHub plugin with your GitHub credentials if you would like the plugin to automatically setup commit hooks in repositories that you administer. Select "Let Jenkins auto-manage hook URLs" and enter your GitHub credentials - generate an oauth token on your github account settings page first - and use that in the Oauth token field (this means you aren't entering in your github password - username is optional):

Also - if you are interested - you can also have github pull requests build and be validated as they come in - read on.

Alternative Configuration

If you would prefer not to enter your GitHub credentials, you can choose "Manually Manage Hook URLs" in step two, and then set up the commit hook manually for each repository you are monitoring with Jenkins.

To do this, go to your repository on github.com, click the "Admin" button at the top of the page, and choose "Service Hooks". Then choose "Post-Receive URLs" and enter the url to your Jenkins instance's GitHub webhook which is "https://<domain-id>.ci.cloudbees.com/github-webhook/" and should be the same for every repository or job.