我认为这应该大致符合您的要求(未经测试)。ProjectLast
它应该在处于状态时触发构建Success
(每 30 秒检查一次),并且时间介于14:00
和之间18:00
(每 60 秒检查一次时间)。
<multiTrigger operator="And">
<triggers>
<projectTrigger serverUri="tcp://server:21234/CruiseManager.rem" project="ProjectLast">
<triggerStatus>Success</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="30" buildCondition="ForceBuild" />
</projectTrigger>
<filterTrigger startTime="14:00" endTime="18:00">
<trigger type="intervalTrigger" seconds="60" />
<weekDays>
<weekDay>Sunday</weekDay>
</weekDays>
</filterTrigger>
</triggers>
</multiTrigger>
巡航控制配置(特别是触发器)的文档应该对所有可能性有足够的解释。
编辑:
所以目前,你有一些东西(我想)看起来像这样:
<project name="ProjectLast">
<tasks>
<!-- some build tasks etc etc -->
<forcebuild>
<project>MyUtility $(ccnet_branchlabel)</project>
<integrationStatus>Success</integrationStatus>
<enforcerName>ProjectLast $(ccnet_branchlabel)</enforcerName>
</forcebuild>
</tasks>
</project>
<project name="MyUtility">
<tasks>
<!-- whatever it is "MyUtility" does goes here -->
</tasks>
</project>
我建议将配置更改为:
<project name="ProjectLast">
<tasks>
<!-- some build tasks etc etc -->
</tasks>
</project>
<project name="MyUtility">
<multiTrigger operator="And">
<triggers>
<!-- the url here will obviously need to change to match your server -->
<projectTrigger serverUri="tcp://server:21234/CruiseManager.rem" project="ProjectLast">
<triggerStatus>Success</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="30" buildCondition="ForceBuild" />
</projectTrigger>
<filterTrigger startTime="14:00" endTime="18:00">
<trigger type="intervalTrigger" seconds="30" />
<weekDays>
<weekDay>Sunday</weekDay>
</weekDays>
</filterTrigger>
</triggers>
</multiTrigger>
<tasks>
<!-- whatever it is "MyUtility" does goes here -->
</tasks>
</project>
注意这里我们已经将项目MyUtility
是否运行的决定移到了MyUtility
项目中,而不是移到了项目中ProjectLast