skabber

Jay Graves

Reverse Proxy on OS X Server for Jenkins & Github

When I first started using Jenkins with Github I was using scm polling to check github for changes. This is bad, there is a much better way. Have github tell you when changes have been pushed via a Service Hook. The problem is that your Jenkins might be behind a private network. The solution is to use a Reverse Proxy.

Setting up a Reverse Proxy on OS X Lion is easy.

  1. Download jenkinsProxy.plist
  2. Modify the url to your local Jenkins server
  3. Move jenkinsProxy.plist into /etc/apache2/webapps/
  4. Run sudo webappctl start org.jenkins.proxy
  5. Point the Github Jenkins Service Hook ^fn to your external IP/Domain Name /github-webhook

And you’re done. Every push to your github repo will ping your local Jenkins server to check for updates.