Triggering build from multiple builds

I have a question, I'm using TeamCity Enterprise 7.0 and trying to  start night build that's depends on multiple builds. My configuration  looks like.
preBuild - get information about sources, version ect.
pcBuild - compilation build pc platform, depends on preBuild, it is triggered by finishing of preBuild
unixBuild -  compilation build unix platform, depends on preBuild, it is triggered by finishing of preBuild.

Night compilation is started by schedule trigger of preBuild, which triggers also pcBuild and unixBuild.
Both  pcBuild and unixBuild aren't related from sources (I'm using external  source tool, no TC one), but they are using link to sources (url and  revision) from preBuild, which has VCS configured under TC.
Also  pcBuild and unixBuild after successful compilation produce deployment  packages which are big so, I'm not adding them as artifacts but upload  them to network storage.

I have multiple deploymentBuild builds  which are dependent from pcBuild and unixBuild as artifact dependency,  those artifacts are txt files with location of deployment packages.
When  I start deploymentBuild its get artifacts from last successful pcBuild  and unixBuild and start deployment process. Those artifacts aren't  created if pcBuild or unixBuild fail, so deploymentBuild fail to start  if any of pcBuild or unixBuild fails to compile.
What I want is trigger somehow deploymentBuild to start when both pcBuild and unixBuild finished successfully.
This  can't be done by schedule timer, because I do not know when pcBuild or  unixBuild finish, this can't be done by vsc trigger because pcBuild,  unixBuild and deplymentBuild aren't attached to any sources. Finish  Build Trigger also isn't solution because it allow only one
build  dependency and I need two. Adding Finish Build Trigger of both pcBuild  and unixBuild will only trigger 2 runs of deplymentBuild.

Summarizing I want trigger that will stat build configuration after two or more other builds configuration completed successfully.

Any suggestion ?

1 comment
Comment actions Permalink

Hi Daniel,

You can configure the following build chain: pcBuild and unixBuild snapshot-depend from preBuild, deploymentBuild snapshot+artifact-depend from both pcBuild and unixBuild configurations. Also you can switch off option "Do not run new build if there is a suitable one" if needed. And configure schedule trigger for deploymentBuild.
In this case, when the trigger fires the whole build chain (4 builds) will be added to the queue and deploymentBuild won't start before both pcBuild and unixBuild finish.
You can find some example in Build Dependencies Setup doc section.


Please sign in to leave a comment.