2 Snapshot Dependencies for 1 config.

Hello, I have a project (project A) with 2 snapshot dependencies (project B and C). Project A is triggered by a build finished trigger so either of the 2 dependencies; B or C will trigger the build of A. I have 2 questions:

1) How does project A know which of the dependencies (B or C) triggered it?

2) Can 2 instances of A run concurrently?

1 comment
Comment actions Permalink

Hi Paul,

 

There is a build parameter, %teamcity.build.triggeredBy%, that contains information about the trigger, although is there any specific reason you need to know which build triggered it? While the ability exists to have the finish build trigger, it's redundant with the snapshot dependencies. A build that is a snapshot dependency of another build will always be triggered when the other one is triggered. In your case, if you trigger A, it will trigger automatically B and C, and reuse when possible. If you are interested in B or C triggering specifically, it can still be done as you have it set up, but it usually just adds extra redundant configuration.

 

The number of parallel builds running of a given build configuration can be configured under the build configuration - General settings - Build options, so yes, it's possible that they run concurrently. This said, they would need to have some difference to them, as typically the server will automatically merge queued builds ("optimize" is how TeamCity names it) if they are considered to be equivalent. The more in depth description is available here: https://www.jetbrains.com/help/teamcity/build-queue.html#BuildQueue-BuildQueueOptimizationbyTeamCity

0

Please sign in to leave a comment.