{jenkins-plugin-info:github}

Github Plugin

This plugin integrates Jenkins with Github projects.

The plugin currently has two major functionalities:

Hyperlinks between changes

The Github plugin decorates Jenkins "Changes" pages to create links to your Github commit and issue pages. It adds a sidebar link that links back to the Github project page.

When creating a job, specify that is connects to git. Under "Github project", put in: git@github.com:Person/Project.git Under "Source Code Management" select Git, and put in git@github.com:Person/Project.git

Trigger a build when a change is pushed to GitHub

To use this feature:

Step 1. Go to the global configuration and choose the mode in which Jenkins manages post-receive hooks in your GitHub repositories.

Step 2. Open "Manage Jenkins > Configure Global Security" page and make sure that "Grant READ permissions for /github-webhook" is enabled in the "GitHub Authorization Settings" section

Step 3. Once that configuration is done, go to the project config of each job you want triggered automatically and simply check "Build when a change is pushed to GitHub" under "Build Triggers". With this, every new push to the repository automatically triggers a new build.

Note that there's only one URL and it receives all post-receive POSTs for all your repositories. The server side of this URL is smart enough to figure out which projects need to be triggered, based on the submission.

Security Implications

This plugin requires that you have an HTTP URL reachable from GitHub, which means it's reachable from the whole internet. So it is implemented carefully with the possible malicious fake post-receive POSTS in mind. To cope with this, upon receiving a POST, Jenkins will talk to GitHub to ensure the push was actually made.

Jenkins inside a firewall

In case your Jenkins run inside the firewall and not directly reachable from the internet, this plugin lets you specify an arbitrary endpoint URL as an override in the automatic mode. The plugin will assume that you've set up reverse proxy or some other means so that the POST from GitHub will be routed to the Jenkins.

Trouble-shooting hooks

If you set this up but build aren't triggered, check the following things:

Documentation Todo:

  • How does this relate to the normal Git plugin? Is it also needed, or does it replace it? Does it offer the same functionality? Why is this even needed?
  • Does this only work with the public github or also private github instances?
  • Maybe also document some if this plugins limitations

Possible Issues between Jenkins and GitHub

Windows:

Change Log

Version 1.8
Version 1.7 (Jul 7, 2013)
Version 1.4 (Jun 13, 2012)
Version 1.3 (May 31, 2012)
Version 1.2 (Mar 13, 2012)
Version 1.1 (Feb 11, 2012)
Version 1.0 (Jan 11, 2012)
Version 0.9 (Jan 4, 2012)
Version 0.7 (Aug 27, 2011)
Version 0.6 (Jul 21, 2011)
Version 0.5 (Jun 10, 2011)
Version 0.4 (Feb 14, 2011)
Version 0.2 (Jun 25, 2009)