Wednesday, March 30, 2011

Releasing from a contuous integration

In the previous post I have described the setup of the continuously integrated system with a hint of problems that you typically encounter when trying to release several components that rely on each other's snapshot versions. Just to give you some idea about this, let's use a drawing:

now, this is a situation we have a releasable component D, which depends on A and B and C, which in turn both depend on A. This is of course a trivial example, imagine that there is another component that depends on A. How do you proceed with releasing (and probably more importantly, bugfixing) workflow for those? Well, let me outline the regular workflow you would have to follow:
  1. release the lowest level of dependencies (A) with standard maven release plugin
  2. change the poms of the intermediate projects (B and C) to point to the just-released version of A
  3. release those
  4. change the version of A in B and C's poms to include the snapshot version of A
  5. lather, rinse, repeat for just as many levels as you have in your project structure.
That's not really user-friendly, is it? I mean there is maven versions plugin that can automate some of those for you, but this still seems odd to use. Now, I found a couple questions related to the topic, and here's what we came up with:
  • identify releasable parts of the system. Make them as large as possible but not larger. The smaller you make them, the more work you will have to do in the next step
  • release them one by one and actually go through the 5 steps described above. Automate with versions plugin
I think the best way to prepare for new release would be to actually branch the whole repo when starting the release procedure in order for the rest of the team to continue working on the trunk (the release should be done from a last-successfull functional tests anyway, I guess). The idea of branches for release candidate seems like a good one too, so that you can then make a branch later if you want to create bugfix release or something to that sort. One of those questions also contained an idea that I found very interesting, namely having the parent pom (or actually grouping poms for that matter) as a separate directory that contains links to the other project's directories via svn:extenals. This seems like really cool solution, but perhaps there are some caveats there too?

No comments:

Post a Comment