Hacker News new | ask | show | jobs
by Pewpewarrows 5390 days ago
I've seen it mentioned a few times, but I've never gotten anyone to explain: how do you go about setting up a CI server (like Jenkins) to automatically track branches, new and old?
2 comments

In Jekins builds can be triggered by simply calling a URL. In Github, it is really easy to add a post receive hook which calls a URL. Just call the build URL, and everytime a branch is pushed, Jenkins will build the project and to other things associated with the task (like deploying to staging, running tests on staging, and deploying to production if the staging tests don't return an error).

There is also a Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin) which should handle this automatically.

At least with the latest jenkins and its git plugin, it builds/tests all branches by default.

Its not overly hard to setup, I just added git repos to the list. I'm still "testing" it locally on my workstation before we start using it in all of our environments.

Ahh, I probably should have updated jenkins and the plugin before asking that. Thanks!