我配置了以下触发器,以便成功构建项目 A 或项目 B 将触发该项目 (C):
<triggers>
<multiTrigger operator="And">
<triggers>
<multiTrigger operator="Or">
<triggers>
<projectTrigger serverUri="tcp://localhost:21235/CruiseManager.rem" project="A" >
<triggerFirstTime>False</triggerFirstTime>
<triggerStatus>Success</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="60" buildCondition="ForceBuild" />
</projectTrigger>
<projectTrigger serverUri="tcp://localhost:21235/CruiseManager.rem" project="B">
<triggerFirstTime>False</triggerFirstTime>
<triggerStatus>Success</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="60" buildCondition="ForceBuild" />
</projectTrigger>
</triggers>
</multiTrigger>
<scheduleTrigger time="20:30" buildCondition="ForceBuild">
<weekDays>
<weekDay>Monday</weekDay>
<weekDay>Tuesday</weekDay>
<weekDay>Wednesday</weekDay>
<weekDay>Thursday</weekDay>
<weekDay>Friday</weekDay>
</weekDays>
</scheduleTrigger>
</triggers>
</multiTrigger>
</triggers>
但是,我真正想要的是只有在项目 A 和 B 的最后一次构建都成功的情况下才能构建项目 C。我认为像下面这样的东西会起作用,但似乎没有任何方法可以在逻辑上反转 projectTrigger。
<triggers>
<multiTrigger operator="And">
<triggers>
<multiTrigger operator="Or">
<triggers>
<projectTrigger serverUri="tcp://localhost:21235/CruiseManager.rem" project="A" >
<triggerFirstTime>False</triggerFirstTime>
<triggerStatus>Success</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="60" buildCondition="ForceBuild" />
</projectTrigger>
<projectTrigger serverUri="tcp://localhost:21235/CruiseManager.rem" project="B">
<triggerFirstTime>False</triggerFirstTime>
<triggerStatus>Success</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="60" buildCondition="ForceBuild" />
</projectTrigger>
</triggers>
</multiTrigger>
<projectTrigger serverUri="tcp://localhost:21235/CruiseManager.rem" project="A" >
<triggerFirstTime>False</triggerFirstTime>
<triggerStatus>NotFailure</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="60" buildCondition="ForceBuild" />
</projectTrigger>
<projectTrigger serverUri="tcp://localhost:21235/CruiseManager.rem" project="B">
<triggerFirstTime>False</triggerFirstTime>
<triggerStatus>NotFailure</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="60" buildCondition="ForceBuild" />
</projectTrigger>
<scheduleTrigger time="20:30" buildCondition="ForceBuild">
<weekDays>
<weekDay>Monday</weekDay>
<weekDay>Tuesday</weekDay>
<weekDay>Wednesday</weekDay>
<weekDay>Thursday</weekDay>
<weekDay>Friday</weekDay>
</weekDays>
</scheduleTrigger>
</triggers>
</multiTrigger>
</triggers>
还有另一种方法可以实现这一目标吗?