|
CruiseControl.NET : Filter Trigger
This page last changed on Dec 18, 2006 by rosspatterson.
The Filter Trigger allows you to prevent builds from occurring at certain times or on certain days (such as when your source control repository is undergoing backup). It is used to decorate an existing trigger. For example, if you have set up a Interval Trigger to cause a new build every 5 minutes, you can use the Filter Trigger to create a window during which the build will not run. The filter will exclude modifications that occur between the start time and the end time on the days specified. If the start time is greater than the end time then the filtered time will span across midnight. For example, if the start time is 23:00 and the end time is 3:00 then builds will be suppressed from 23:00-23:59 and 0:00-3:00 on the days specified.
Example
<filterTrigger startTime="23:30" endTime="23:45"> <trigger type="intervalTrigger" seconds="60" /> <weekDays> <weekDay>Sunday</weekDay> </weekDays> </filterTrigger> This trigger suppresses builds if any modifications are made between 23:30 and 23:45 on Sunday nights. Configuration Elements:
Nested Filter Triggers:Sometimes you would like to suppress builds that occur either between certain times or on certain days or in multiple combinations of dates and times. To acheive this, you can nest multiple filter triggers. For example, the following xml configures a trigger to filter builds between 7pm and 7am on weekdays and at any time on Saturdays and Sundays. <filterTrigger startTime="19:00" endTime="07:00"> <trigger type="filterTrigger" startTime="0:00" endTime="23:59:59"> <trigger type="intervalTrigger" name="continuous" seconds="900" buildCondition="ForceBuild"/> <weekDays> <weekDay>Saturday</weekDay> <weekDay>Sunday</weekDay> </weekDays> </trigger> </filterTrigger> With contributions from: Oane Stienstra |
| Document generated by Confluence on Jun 21, 2007 10:33 |