I'd like to use build dependencies as a means to segment various distinct parts of my build process. My project builds using maven. Currently, I have TeamCity set up like so:
1. a 'compile' build configuration, configured to run the 'clean' and 'compile' mvn goals
2. a 'derby test and package' configuration, which is dependent on #1 and runs the 'package' mvn goal (our tests run against Derby by default).
3. a 'hsqldb test' configuration, which is dependent on #2 and runs the 'test' goal with '-Ptest-hsqldb' (which tells our test environment to run against HSQLDB).
Ideally, when running steps 2 and 3, I'd like it if TeamCity would not get new sources, but instead would just use the sources from step 1. However, based on the logs, it looks like TeamCity fetches new sources every time it runs a build. Clearly, if configuration 2 were fired off on a different build agent than #1, this would be a problem. However, I am happy with the constraint that #2 must happen on the same agent as #1.
In other words, I'd like it if all my dependent builds could run in exactly the same environment. Is this possible?