I read a lot about the various dependecies which TeamCity supports, but I#m still uncertain about how to set up the following:Porject A builds our software and deploys it ot our J2EE Container.Project B runs pre intergation test.I want to run Porject B on successful build of A and on manual triggering, but then without building A upfront (explanation: our software integrates with a lot of external services which might have broken pre integartion tests... so a new run of the tests will show if these external services are working th expected way)Thank you in advance...

Mark Doppelfeld

Votes

0

Share

The simpliest option is to use dependency trigger (Build Configuration settings > Build Triggering > Dependencies > Add build dependency trigger) in B and choose A as a dependency.This way B will be put into the queue when A succeeds.

With this approach B and A will not be linked anyhow except for build B queueing event.

If build B also has artifact dependencies on A, you may want to use snapshot dependencies. In this setup if you need to trigger B manually and force it to use existing build of A you may use custom run dialog (ellipsis on "Run" button) and choose a build of A to use.

thanks for your quick answer.I started with this configuration, but saw Build <B> start even when Build <A> failed. At least that's what I think happend.Do you have an explanation for this behaviour, or am I just wrong with my observation?!?!?Best regardsMark

Please check the build was not run manually or by other trigger. You can get the build triggering reason in the "triggered by" field on the builds results page.

Is it possible tha thte build was triggered by a successful A build, but was waiting in the queue and was actually started when another build of A failed? This is a valid case, since the dependency trigger just puts the build into the queue without any extra logic.

If neither of these are the case, please attach screenshots of the wrongly triggered B build results, history table of configuration A and teamcity-server.log covering the first build A run.

I siwtched my buidl setup back to use BuildTriggering:Dependency:Build<A> setting and will watch out for unclear triggering ov Build<B>.Thank you very much for your quick and informative answers.Best regardsMark