Reputation: 8562
I'm trying to get CCNet to build a project at a scheduled time, but ONLY if another project successfully built since the last time. I have the following block:
<triggers>
<multiTrigger operator="And">
<triggers>
<projectTrigger project="Trunk Integration Tests">
<triggerStatus>Success</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="30" buildCondition="IfModificationsExist" />
</projectTrigger>
<scheduleTrigger time="15:00" buildCondition="ForceBuild" name="Scheduled" />
</triggers>
</multiTrigger>
</triggers>
To head off any questions about why I want to do this; we have integration tests that run once an hour. The build from which the above code comes is a deployment build that pulls down the code, compiles, and the pushes the code out to one of our servers. We have deployment builds for dev servers, QA and staging.
The problem I'm having is that this build fired at 4:45PM yesterday, just after the integration build was successful. CCNet says the build reason was Build (ForceBuild) triggered from Scheduled
.
What's going on here, and how can I get it working like I described?
Upvotes: 1
Views: 848
Reputation: 1
I use triggerFirstTime true to fire with a schedule interval.
<projectTrigger project="MyProject">
<triggerStatus>Success</triggerStatus>
<triggerFirstTime>true</triggerFirstTime>
<innerTrigger type="scheduleTrigger" time="10:30" buildCondition="ForceBuild" name="Scheduled" />
</projectTrigger>
Upvotes: 0
Reputation: 32270
I think it's possible to avoid <multiTrigger>
in this case. You can just author a <projectTrigger>
, and set its <innerTrigger>
to the type of <scheduleTrigger>
. Something like this:
<triggers>
<projectTrigger project="Trunk Integration Tests">
<triggerStatus>Success</triggerStatus>
<innerTrigger type="scheduleTrigger" time="15:00" buildCondition="IfModificationsExist" name="Scheduled" />
</projectTrigger>
</triggers>
Upvotes: 1