vcs trigger with trigger rules in build chain
Hi,
is it possible to setup such a build chain configuration (described below) in teamcity?
A->B
A and B working with different version control settings (they use different repos from GIT)
B depends (snapshot dependecy with "Do not run new build if there is a suiteble one" and use successfull build) on A
A should trigger a build of artifact X if there is a change in git except commits with particular comment and it should put artifact X into nexus
B should wait for A if there is an ongonig build running then it should take the latest artifact X from nexus and it should install it
B is triggered once per day at particular time
I want to run B once per day and A only if there is a change in git except commits with particular comment
Thanks in advance.
Regards Gabriel.
Please sign in to leave a comment.
Do trigger rules defined at the end of build chain (B) valid for other build job(s) (A) defined at top of build chain?
Hi Gabriel,
sorry for the delay in answering. Unfortunately no, the triggers work separately, and trigger rules only impact when that specific trigger is the reason for the build to happen. In your instance, having the trigger rules in A won't impact them when B is triggered. Also, we don't really have a concept of optional dependencies
The solution for this is usually to have a separate build configuration with a first build step that checks that the conditions you exactly want are met, and then triggers a build on A manually via the REST API. For this, B would need access to the A's VCS Root, so having a separate configuration specifically for this task is recommended, although if you don't trigger B outside the scheduled trigger, you can simply reuse it.
Hope this helps.