Build chains without snapshot

Hi all,

I'm trying to figure out what I think is essentially setting up a build chain in TeamCity without the 'snapshot' behavior.
Our project has several Git repositories - A, B, C, D, E (there's actually more) - which have some interdependency:
        A
  /           \
B           C
  |           /
  D       /
    \     /
       E

The behavior we'd like is for when we check something into A, for A to build first, and eventually E to build when both D and C had finished building.
We used snapshot dependency for a while but had issues with it. For instance when B finished building due to a change in A, TeamCity would calculate a changeset for D that corresponds to the last time we'd checked into B, check out that changeset and build. In a lot of cases, this would mean we'd get a build of D that was several weeks old. Additionally, while building the dashboard would warn saying that a newer build for D was available but continue chugging along.

We switched to using plain Finished build triggers, but don't have any way to express build chains with it. E gets triggered independently by both D (via B) and C and ends up building multiple times whenever we finish a build of A..

What would be the best way to express our build dependencies?

3 comments
Comment actions Permalink

Hi,

In this case you can use Finished build triggers togather with snapshot dependency. If you configure two finish build triggers for E (after C and D) it won't start before both C and D builds finish.

0
Comment actions Permalink

Thanks for your reply Alina. Like I mentioned in my first post, what we noticed with Snapshot dependency was that TeamCity calculates changesets for "suitable build" that might be miich older. Is there a way to change the behavior of "suitable build" behavior so that it always picks the latest changeset?

0
Comment actions Permalink

No, there is no way to change the behavior of "suitable build".
Usually it is configured like this. Snapshot dependencies configured and only one VCS trigger is added for the last build in the chain (E in this example) and turn on flag "Trigger on changes in snapshot dependencies". In this case the whole build chain (exclusing suitable builds) will be build if there will be commits in any build configuration. So the chain is always uptodate.

0

Please sign in to leave a comment.