This page last changed on Jun 26, 2007 by rosspatterson.

The Url Trigger is used to trigger a CCNet build when the page at a particular url changes. The Url Trigger will poll the specified url according to a configured polling interval to detect if the last modified date of the page has changed since the last integration.

This trigger is especially useful in reducing the load on your source control system caused by the polling for modifications performed by an Interval Trigger. If your source control system supports trigger scripts (such as the use of commitinfo scripts in CVS), you can use create a trigger to touch the page that is being monitored by CCNet to start a new integration.

Examples

NOTE: Like all triggers, the urlTrigger must be enclosed within a triggers element in the appropriate Project Configuration Block

Minimalist example:

<urlTrigger url="http://server/page.html"  />

Full example:

<urlTrigger url="http://server/page.html" seconds="30" buildCondition="ForceBuild"/>

Configuration Elements:

Node Description Type Required Default
url The url to poll for changes. string true N/A
seconds The number of seconds after an integration cycle completes before triggering the next integration cycle. int false 60
buildCondition The condition that should be used to launch the integration. By default, this value is IfModificationExists, meaning that an integration will only be triggered if modifications have been detected. Set this attribute to ForceBuild in order to ensure that a build should be launched regardless of whether new modifications are detected. string false IfModificationExists
name The name of the trigger. This name is passed to external tools as a means to identify the trigger that requested the build. (Added in CCNet 1.1) string false UrlTrigger

NOTE: there is currently a limitation in this trigger such that it will not persist the url's last modified date when the server restarts. This means that the trigger will always attempt to start a new integration when the first interval expires after the server starts up.

NOTE: The UrlTrigger will only work with pages that return a reliable LastModified date HTTP Header, such as static html pages or well-behaved dynamic pages. Using static html pages is the most reliable way to use this trigger.

This trigger has been contributed by Steve Norman

Document generated by Confluence on Mar 14, 2009 02:55