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.
- Download jenkinsProxy.plist
- Modify the url to your local Jenkins server
sudo webappctl start org.jenkins.proxy
- 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.