Tasks and Publishers

Task Blocks are the action elements of CruiseControl.Net. They're the elements that do things, like executing a program, running tests, or send email results.

Task blocks must appear in the prebuild section, the tasks section or the publishers section. The tasks section is always run before the publishers section, regardless of the order in which they appear. However, within each of these sections, the tasks are run in the order they appear.

The prebuild section is intended for tasks which need to be run before the build starts, including the sourcecontrol operation.

The tasks section is intended for build tasks, such as a [NAnt Task] or [MsBuild Task]. If any of these build tasks fail, no further tasks in this section will be executed. Instead, CruiseControl.Net will skip to the publishers section. Thus the task that publish the results of the build should usually be placed in the publishers section.

The publishers section is run after the build completes (whether it passes or fails). This is where you aggregate and publish the build results. The publishers section typically starts with a merge task to collect any output from other tools, so that the results can be shown on the dashboard. Next, the [Xml Log Publisher] task is required to include the CruiseControl.Net XML output. Finally you might have one or more [Email Publisher] tasks. Note that you can still use any of the other tasks here. For example, you might run a [NAnt Task] that preprocesses the output files before merging them into CruiseControl's output stream.

Starting with CruiseControl.NET 1.5.0, it is possible to define dynamic parameters for most tasks. The full details on how to do this is available in [Dynamic Parameters].
Note: Not all tasks allow dynamic parameters. A task that can use dynamic parameters will have a dynamicValues element in the task.

Historical Note

Publishers and Tasks were different objects in earlier version of ccnet. Now they are interchangeable, and can appear either in the prebuild section, the tasks section, or the publishers section of the ccnet.config file depending on whether they should be run before, during or after the build.

The task blocks :