I have several build configurations, all of which share the same VCS root and checkout directory:
- Quick compile
- Build for platform A
- Build for platform B
- Deploy for platform A and B
The VCS is SVN, and is done as a checkout on server rather than on agent. The repository is large and our connection is slow, so I want to avoid clean checkouts as much as possible - they take ~12 hours and dwarf actual build times.
The quick compile runs quickly to give an early pass/fail. The builds are much slower.
The quick compile and build for platform A are run on an VCS trigger. Platform B isn't.
The deploy step has a snapshot and artifact dependency on the builds for A and B, and is run nightly.
Recently I changed the quick compile to have a higher priority than normal, to make sure it ran before the build for A when triggered by VCS, in order to get faster feedback on failures to the team.
This has had the unfortunate effect that if the VCS trigger triggers in-between the builds for platform A and B when being run due to the deploy step dependency, then a clean checkout is forced, since when going back to the build for A or B an older version is needed to be checked out.
What can I do to stop a clean checkout happening in this situation? I can see three options but I don't like any of them:
- Reset the priority of the quick compile - bad because I do still want it to happen first
- Give all build configurations separate checkout directories - bad because they all take a lot of disk space, and there are several more platforms than just A and B in this example!
- Use 'checkout on agent' - annoying because I'll have to install SVN on all agents which is a pain on Windows, also I don't even know if this will fix the problem, also all agents will need to do a full sync again... but maybe this is the best option available to me anyway.
There are two improvements that could be made to Team City that would fix this for me - would it be possible to implement either of these?
- Allow 'checkout on server' configurations to build patches that change from newer to older revisions to avoid clean checkout in this situation - I don't know why this isn't supported anyway
- Allow builds triggered because of snapshot/artifact dependencies to have a custom priority - I think in general it would be useful to be able to override priority per build anyway, perhaps in the "Run..." dialogue
If I've missed something and there's a better way, please let me know!