views:

214

answers:

2

Currently the my team is considering splitting our single CI build process into a more streamlined multi-stage process to speed up basic build feedback and isolate different ci concerns. The idea we had was to have each stage exist in Hudson as a different build with the correct maven goal or maven plugin execution, then chain them together using the post-build hooks of Hudson.

However to my knowledge, Maven as a build tool mandates that any lifecycle phase which is performed automatically builds every preceding lifecycle phase. This presents a number of problems the most significant of which is that maven is recreating the build resources with each distinct call and not using those of the previous stage. This not only breaks the consistency of the build lifecycle but has much more unnecessary processing overhead.

Is there a way to accomplish pipelining with CI using Maven? Assuming there is, is there a way to let Hudson know to use those resources built from the previous stage in the next one?

A: 

I don't think this is well supported (see sharing build artifacts between jobs in hudson) and even less when using Maven.

Pascal Thivent
A: 

In addition to the general approach of just sharing build artifacts through an external repository (e.g. structured file share), you can either archive the artifacts needed with Hudson's on board options or use the Clone Workspace Plugin. Have a look at issue HUDSON-682 that let to the creation of this plugin.

Peter Schuetze