GitHub Webhooks

These repos are currently polled to check for changes. It would be significantly more efficient for the teams if changes to the GitHub repos caused an immediate ping to our internal, Jenkins based, CI servers.

GitHub provides the Webhooks mechanism to allow for this interaction. These Webhook take the form of a payload based HTTP POST event.

We currently have two Mac Mini’s (One for each of iOS and Android development) which need to be the recipients of these incoming POSTs.

As these Mac Mini’s reside on our LAN appropriate firewall rules will need to be created to allows the Github originated HTTP POSTs through out firewall to the Mac Minis.

The following script can be used to obtain the IP/CIDR for the GitHub webhook IP address range (Via /meta).

We would like to link our local, Jenkins based build system to our hosted GitHub accounts.

I believe that this will require a firewall change to allow to GitHub server(s) to trigger a build (Via a WebHook) on our local server.

Obviously more details will be needed and this is just a placeholder ticket to start the ball rolling.

Remotely triggering Jenkins

# Allow *only* the notifyCommit endpoint, and don't expose any other info
location = /git/notifyCommit {
  proxy_hide_header       X-Powered-By;
  proxy_intercept_errors  on;
  error_page              500 /;

Or git-webhook-proxy on GitHub

Also general notes on (githooks]( & here