How to build a project in teamcity after multiple other builds have finished and not trigger the dependency chain?

时光毁灭记忆、已成空白 提交于 2019-12-07 20:45:01

问题


My questions is related to Trigger subsequent build once after multiple parallel builds in TeamCity but I have hit a problem so posting it here.

Below is my setup. I am trying to create a chain so that when I run A, the complete chain runs.

A ( Root project) - B ( Snapshot dependent on A + Finish Build trigger on A) -( Snapshot dependent on B) Aggregation project.

A ( Root project) - c ( Snapshot dependent on A + Finish Build trigger on A) - ( Snapshot dependent on C)Aggregation project.

The snapshot dependency does not really do anything ( there is no snapshot, I am using a dummy build config at A), I had to create that as I wanted to pass dynamic value from A down the chain using %dep which I was not able to achieve only with Finish Build trigger.

Now, I also need to be able to trigger B independently ( in that case I dont need aggregation, it is only needed when root project A is launched) so that C does not get triggered and vice versa, but with current setup when I trigger B, A gets triggered ( due to snapshot dependency, then Aggregation gets triggered, then C gets in the queue as aggregation is also snapshot dependent on C). I am new to Teamcity so I could be doing it all wrong. Any help is appreciated.


回答1:


In order to achieve your goal, you need to:

  1. Remove the finish build triggers
  2. Ensure that that there's a snapshot dependency from B => A and from C => A
  3. Add a new build (D) that has a snapshot dependency on B and C. This will be the build to trigger when you want A, B and C to run

Triggering C will only cause A and C to run and triggering B will only cause A and B to run.

If you need help configuring this then let me know

Hope this helps



来源:https://stackoverflow.com/questions/38998019/how-to-build-a-project-in-teamcity-after-multiple-other-builds-have-finished-and

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!