My project uses maven, which has a somewhat-rigid lifecycle concept. I'm running with two build agents, primarily so that a particular long-running test suite can run in parallel to other changes that are happening. I was also hoping that I would be able to let the other upstream (dependency-wise) test configurations run in parallel on the two agents also.
However, I'm running into a problem. The first step (compile) in my build / test configuration runs 'mvn clean compile', which deletes the directory that has the derby and hsql databases in it. But, this target only runs on one of the two agents. So, if it runs on one agent, and then hsql and derby tests kick off in parallel, either the hsql or derby tests will be running in an environment that hasn't been cleaned since the last run.
I'd love it if I could create a build configuration that must be run on all agents before running any of the other test configurations, so that I could run a clean on each machine, but not have to do extra cleaning.
A workaround is for me to just merge the 'compile' and 'derby test' targets, and make hsql run totally independently and do its own cleanup. The downside here is that I'll end up running two configurations even when there's a failure during compilation, which will turn into spurious emails / failure notifications.