I have two build configurations (the second dependent on the first) that I want to run against the same checkout. Specifically, I'd like to ensure that they are both run against the exact same versions of source files. It think that most of the time the second build will naturally have the same sources as the first, but I don't want to leave this to chance. I don't see an obvious way to do this in TeamCity, but I have two ideas on how it could work.
1. The builds could share a checkout directory. The second build runs (after the first completes successfully) on the same directory structure that the first used exactly as it stood when it was finished.
2. The first build tags the source with a tag that contains its build number. The second build could check out this tag, if there was a way for it to know the build number of the first build's last successful run.
Are either of these solutions possible? If not, does anyone have a solution that is? Is anyone else in this situation?
It would be possible for us to augment the artifacts produced by the first build and modify the second to run off of those artifacts rather than src, but that path would be much more work than either of the above solutions.