We have a five step build process:
Steps 2 & 3 are triggered by a fiish build trigger on step 1. Step 4 is triggered by a finish build trigger on step 3, and uses the artifacts generated in 3. Step 5 is manual.
Steps 1 through 3 are maven builds performed on a clean checkout of the head from subversion. Herein lies the problem. If a developer commits during step 1, then steps 2 and 3 will be run against a different revision than step 1. With really bad timing it is possible for steps 1 through 3 to run on different revisions.
Is there a way to carry the revision number from step 1 through the other steps?
Thanks for the response. Can you clarify a little?
Following your advice I have tried creating a snapshot dependency but I can't find a place to use the parameter you mentioned. With the snapshot dependency I have selected options to not run a new build if a successful one exits and to only use successful builds from suitable ones. When running the build manually this tries to rebuild the (currently) broken build, rather than taking the previous successful build.
I have also looked at adding an artifact depedecy, which does contain a placeholder for the parameter, but when I use it TC complains that it "cannot find build by specified parameters". I have tried changing the artifact dependency to 'last successful build', but the artifact list is empty. In both of these cases I cannot create an artifact dependency.
Actually, I read your first post wrong. What you need is just snapshot dependencies and nothing else http://confluence.jetbrains.com/display/TCD8/Snapshot+Dependencies.
And in the artifact dependency you should use "build from the same chain"