Michal Čihař - Triggering Jenkins from GitHub

Triggering Jenkins from GitHub

For some time I thought it is not effective to use polling to get latest changes from GitHub into Jenkins, which we use for continuous integration, but II was always too lazy to investigate.

Today I finally took a look at it and it turns out to be quite easy:

  1. Enable Github plugin in Jenkins.
  2. Enable "Build when a change is pushed to GitHub" in project configuration in Jenkins
  3. Disable "Prevent Cross Site Request Forgery exploits" in Jenkins configuration (to prevent bug JENKINS-10263).
  4. Configure Jenkins service hook in GitHub to trigger your server (the URL is http://<jenkins>/github-webhook/.

Try testing the hook and check "GitHub Hook Log" in Jenkins if it really works and you're done.

So now, phpMyAdmin's tests should start as soon as somebody pushes changes to GitHub.