Exactly! I'd love to see a post with this much detail talking about the technicals of their deploy process. Using this free-wheeling branching model, requires some very flexible deploy tools, which I don't think(?) exist in the wild. Please school me...
You use the github plugin with Jenkins, and tell Jenkins to build all branches. That's about it.
edit: more details here -- this is what Relevance uses for our CI: https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin
I don't use jenkins, I use buildbot, but I'm sure it is quite similar. If you use github's post-receive hooks it reports all branches not just master when something changes. So if jenkins can build from a posted JSON object, it is quite simple to do. On our top level project if anyone checks into a topic branch it is built and tested automatically.
Re:GitHub Flow
by technomancy on Wednesday August 31, 2011 @02:37PM
(#2946917)
I'm curious about this too. I know Jenkins has a rest API; maybe it's attached to Github web hooks.
I think atmos spills the beans on how their builds with Jenkins work...
Re:GitHub Flow
by ConstantineXVI on Wednesday August 31, 2011 @02:01PM
(#2946730)
I believe Jenkins can be set to pick up the latest commit, regardless of branch. Either they've got a plugin to handle it or they just look over the builds manually.
Why would somebody downvote this?
I don't think it's possible with the typical git/github plugins out of the box. However, Jenkins lets you run any manner of scripts at different parts of the build.
One simple (perhaps too simple) way to implement this would be to run a script which enumerates branches and exports the name of the most recently touched branch to an environment variable. Then, parameterize the build on that environment variable.
Your approach is valid. We're doing something similar (e.g. auto-building Debian packages on each commit/push) and use git's post-receive and svn's post-commit hook to detect the modified branch and then trigger a parameterized Jenkins build which takes the branch as argument. You can even trigger different kinds of builds/tests/... depending on the branch name. Due to the nature of branching inside Git it's much more fun with Git, but it basically works for subversion as well.
From this, it sounds like Jenkins is automatically picking up new topic branches, running the tests, and reporting on the results. Any suggestions on how to set something like this up? In my (very limited) experience with Hudson/Jenkins, this sounds like it wouldn't be possible without manually setting up a project for each branch.