Build order for project configurations

Hello guys, we have a project with several build configuration (each one represents maven module). Build of each configuration is triggered by VCS trigger. Subject of interest is
  1. Source code is committed into VCS and affects several modules.
  2. Build of all dependent modules is triggered by VCS trigger.

How to guarantee modules build order?

To clarify the question lets consider following example:
Assume that there are two modules:
  • module1
  • module2

module2 depends on module1
Then somebody makes commit that affects module1 and module2, so we assume module1 to be build before module2, but TeamCity builds module2 first. In such case build for module2 is failed.
Comment actions Permalink

Hi Andrey

Set Snapshot Dependency, it will guarantee correct build order.


Comment actions Permalink

Hi Michael,

We have a similar issue however our Module 1 is a shared library which we only want built when it has changes. In the scenario where code triggers both build configurations, the snapshot dependencies would work for us as is. However if only changes to Module 2 are checked in we wouldn't want the snapshot dependency to kickoff a new build of Module 1.

Is there are way of doing this?


Comment actions Permalink

Actyally this is default behavior.
Do not run new build if there is a suitable one option in snapshot dependency settings handles this - if the configuration has no pending changes then artifacts from previous builds are reused.


Please sign in to leave a comment.