Build version synchronisation

I'm trying to set up TeamCity for building and testing our product. I have the following (simplified) configurations
A: Build the product
B: Build test code against the product in A.
C: Take the test binaries from B and run them against the product in A. The versions of B and A must be synchronised, so that the test assemblies can load the product assemblies.

I have the following trigger/dependency settings:
A: Triggered by VCS. No dependencies
B: Triggered by successful build of A or by VCS. Snapshot dependency on on A. Artefact dependency on A for the product to build the test against.
C: Triggered by successful build of B. Snapshot dependency on both A and B. Artefact dependency on both A and B.

C can't just take the latest successful A and B, since the latest A may be incompatible with the latest B. C wants compatible pairs. One option would be to take the latest successful B and the corresponding A (which may or may not be the latest)

With the settings as above, C never runs. It looks as though this is because of frequent checkins, starting new runs for A and B.
Note that C has a dedicated agent, so always has a free agent to run on.

Any suggestions as to how I set up the trigger & dependency settings?

Thanks

Rob

3 comments
Comment actions Permalink

It looks as though I may be misusing the snapshot dependency feature. But if I don't, how do I ensure that C's artefact dependencies on both A and B use compatible artefacts?

0
Comment actions Permalink

Use Build from the same chain option in artifact dependency settings.

Also, set VCS trigger in build C (even if it has no attached VCS roots at all) and enable Trigger on changes in snapshot dependencies option.
This approach works better than Finish Build trigger.

Michael

0
Comment actions Permalink

Excellent - that seemed to do the trick. We've only just upgraded to 6.5, now a lot of things work much better. Our test runner agents were starved before, because they were triggered by a build finishing, and would then start another build.
Thanks
Rob

0

Please sign in to leave a comment.