问题
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:
- Remove the finish build triggers
- Ensure that that there's a snapshot dependency from B => A and from C => A
- 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