Tuesday, October 18, 2011

Setting up Hudson to trigger a build with every push to your GitHub repo

Once again, this required a little bit of parsing around the internet. The way to trigger a Hudson build remotely is to send a POST request to this address:

http://<hudson addr>:8080/job/<your-job-name>/build

In order to find the exact POST URL for your Hudson install, navigate to the API page located at <hudson addr>/job/RedTeam/api

Once you have this address, go to your GitHub repository. Select "Admin" in the top menu, and click "Service Hooks". Now select "Post-Receive URL's" and add the address you copied from the Hudson API.

Finally, do a test git push, just to make sure everything works.

Cheers, and I hope this helps folks out there!

0 comments:

Post a Comment