CruiseControl Configuration Reference
CruiseControl configuration files are written in XML. This document describes the XML elements and attributes for a valid configuration file.
The use of plugins means that other
elements not documented here can also be used in the configuration.
At a minimum, though, the config file contains a single top level
<cruisecontrol> element, with one or more child
<project> elements.
Alphabetical Index
<accurev> <accurevbootstrapper> <alienbrain> <alienbrainbootstrapper> <alwaysbuild> <ant> <antbootstrapper> <antpublisher> <artifactspublisher> <bootstrappers> <composite> <buildstatus> <clearcase> <clearcasebaselinepublisher> <clearcasebootstrapper> <clearcaseviewstrapper> <cmsynergy> <cmsynergybaselinepublisher> <cmsynergybootstrapper> <cmsynergysessionmonitor> <cmsynergytaskpublisher> <compound> <cruisecontrol> <currentbuildstatusbootstrapper> <currentbuildstatusftpbootstrapper> <currentbuildstatusftplistener> <currentbuildstatusftppublisher> <currentbuildstatuslistener> <currentbuildstatuspagelistener> <currentbuildstatuspublisher> <cvs> <cvsbootstrapper> <dateformat> <delete> <email> <exec> <execbootstrapper> <execute> <filesystem> <forceonly> <ftppublisher> <gzip> <harvest> <htmlemail> <httpfile> <include.projects> <jabber> <labelincrementer> <listeners> <lockfilebootstrapper> <lockfilelistener> <log> <maven> <maven2> <mavensnapshotdependency> <maven2snapshotdependency> <merge> <mks> <modificationset> <nant> <phing> <onfailure> <onsuccess> <p4> <p4bootstrapper> <pause> <plasticscm> <plasticscmbootstrapper> <plugin> <plugin> <project> <property> <publishers> <pvcs> <rss> <sametimeannouncement> <schedule> <scp> <sfeedocman> <sfeefrs> <sfeetracker> <snapshotcm> <snapshotcmbootstrapper> <socket> <starteam> <starteambootstrapper> <surround> <surroundbootstrapper> <svn> <svnbootstrapper> <targets> <timebuild> <threads> <triggers> <ucm> <veto> <vss> <vssbootstrapper> <vssjournal> <weblog> <x10> <xsltlogpublisher> <yahoopublisher>
Hierarchical Index
<cruisecontrol> <property/> <include.projects/> <system> <configuration> <threads/> </configuration> </system> <plugin/> <project> <property/> <plugin/> <dateformat/> <labelincrementer/> <listeners> <cmsynergysessionmonitor/> <currentbuildstatusftplistener/> <currentbuildstatuslistener/> <currentbuildstatuspagelistener/> <lockfilelistener/> </listeners> <bootstrappers> <accurevbootstrapper/> <alienbrainbootstrapper/> <antbootstrapper/> <clearcasebootstrapper/> <clearcaseviewstrapper/> <cmsynergybootstrapper/> <currentbuildstatusbootstrapper/> <currentbuildstatusftpbootstrapper/> <cvsbootstrapper/> <execbootstrapper/> <lockfilebootstrapper/> <p4bootstrapper/> <plasticscmbootstrapper/> <snapshotcmbootstrapper/> <starteambootstrapper/> <surroundbootstrapper/> <svnbootstrapper/> <vssbootstrapper/> </bootstrappers> <modificationset> <accurev> <alienbrain/> <alwaysbuild/> <buildstatus/> <clearcase/> <cmsynergy/> <compound> <targets/> <triggers/> </compound> <cvs/> <filesystem/> <forceonly/> <harvest/> <httpfile/> <mavensnapshotdependency/> <maven2snapshotdependency/> <mks/> <p4/> <plasticscm/> <pvcs/> <snapshotcm/> <starteam/> <surround/> <svn/> <timebuild> <ucm> <veto/> <vss/> <vssjournal/> </modificationset> <schedule> <ant/> <maven/> <maven2/> <pause/> <nant/> <phing/> <exec/> <composite/> </schedule> <log> <merge/> <gzip/> <delete/> </log> <publishers> <antpublisher/> <artifactspublisher/> <clearcasebaselinepublisher/> <cmsynergybaselinepublisher/> <cmsynergytaskpublisher/> <currentbuildstatuspublisher/> <currentbuildstatusftppublisher/> <email/> <execute/> <ftppublisher/> <htmlemail/> <jabber/> <onfailure/> <onsuccess/> <rss/> <sametimeannouncement/> <scp/> <sfeedocman/> <sfeefrs/> <sfeetracker/> <socket/> <weblog> <x10/> <xsltlogpublisher/> <yahoopublisher/> </publishers> </project> </cruisecontrol>
<cruisecontrol>
<cruisecontrol>
The <cruisecontrol> element is the root element
of the configuration, and acts as a container to the rest of the
configuration elements.
Child Elements
| Element | Cardinality | Description |
|---|---|---|
| <system> | 0 .. 1 | Currently just a placeholder for the <configuration> element,
which in its turn is just a placeholder for the <threads> element. We expect that in the future, more system-level features can be configured under this element. |
| <project> | 1 .. * | Defines a basic unit of work. |
| <plugin> | 0 .. * | Registers a classname with an alias. |
| <property> | 0 .. * | Defines a name/value pair used in configuration. |
| <include.projects> | 0 .. * | Add projects defined in other configuration files. |
<threads>
<cruisecontrol> <system> <configuration> <threads>
The <threads> element can be used to configure the number of threads that CruiseControl can use
simultaneously to build projects. This is done through the count attribute.
If this element (or one of its parent elements) is not specified, this defaults to 1.
This means that only one project will be built at a time. Raise this number if your server has enough resources to
build multiple projects simultaneously (especially useful on multi-processor systems). If more projects than the maximum
number of threads are scheduled to run at a given moment, the extra projects will be queued.
Attributes
| Attribute | Required | Description |
|---|---|---|
| count | Yes | Maximum number of threads to be in use simultaneously to build projects |
<property>
<cruisecontrol> <property>
The <property> element is used to set a property (or set of properties)
within the CruiseControl configuration file. Properties may be set at the global level
and/or within the scope of a project. There are three ways to set properties within CruiseControl:
- By supplying both the name and value attributes.
- By setting the file attribute with the filename of the property file to load. This property file must follow the format defined by the class java.util.Properties, with the same rules about how non-ISO8859-1 characters must be escaped.
- By setting the environment attribute with a prefix to use. Properties will be defined for every environment variable by prefixing the supplied name and a period to the name of the variable.
Properties in CruiseControl are not entirely immutable: whoever sets a property last will freeze it's value within the scope in which the property was set. In other words, you may define a property at the global level, then eclipse this value within the scope of a single project by redefining the property within that project. You may not, however, set a property more than once within the same scope. If you do so, only the last assignment will be used.
Just as in Ant, the value part of a property being set may contain references to other properties. These references are resolved at the time these properties are set. This also holds for properties loaded from a property file, or from the environment.
Also note that the property ${project.name} is set for you automatically and will always resolve
to the name of the project currently being serviced - even outside the scope of the project
definition.
Finally, note that properties bring their best when combined with plugin preconfigurations.
Attributes
| Attribute | Required | Description |
|---|---|---|
| name | Exactly one of name, environment, or file. | The name of the property to set. |
| environment | The prefix to use when retrieving environment variables. Thus if you specify environment="myenv" you will be able to access OS-specific environment variables via property names such as "myenv.PATH" or "myenv.MAVEN_HOME". | |
| file | The filename of the property file to load. | |
| value | Yes, if name was set. | The value of the property. This may contain any previously defined properties. |
| toupper | No | Used in conjunction with environment. If set to true, all environment variable names will be converted to upper case. |
Examples
- Set a couple of global properties using name/value pairs:
<cruisecontrol> <property name="cruisedir" value="/home/cruise"/> <property name="logdir" value="${cruisedir}/logs"/> ... <cruisecontrol> - Set a collection of global properties from the properties file "config.properties":
<cruisecontrol> <property file="config.properties"/> ... <cruisecontrol> - Load the system's environment into a collection of global properties.
Uppercase all environment variable names:
<cruisecontrol> <property environment="env" toupper="true"/> <property name="logdir" value="${env.CCDIR}/logs"/> ... <cruisecontrol> - Define a global property called "buildmanager". Override it's value
only within the scope of the project called "project2".
<cruisecontrol> <property name="buildmanager" value="buildmgr@here.com"/> <project name="project1"> <!-- ${buildmanager} resolves to "buildmgr@here.com" --> </project> <project name="project2"> <property name="buildmanager" value="someoneelse@here.com"/> <!-- ${buildmanager} resolves to "someoneelse@here.com" --> </project> <cruisecontrol> - As demonstrated here, properties and
plugin pre-configuration
can be an extremely powerful combination.
<cruisecontrol> <!-- Load environment variables --> <property environment="env" toupper="true"/> <!-- Commonly used directories --> <property name="reportdir" value="${env.CCDIR}/report"/> <property name="projectdir" value="${env.CCDIR}/checkout/${project.name}"/> <property name="testdir" value="${projectdir}/build/junit-reports"/> <property name="logdir" value="${env.CCDIR}/logs/${project.name}"/> <!-- Defaults for email --> <property name="buildmaster.email" value="buildmaster@example.com"/> <property name="buildmaster.name" value="Buildmaster"/> <!-- Preconfigure our plugins --> <plugin name="log" dir="${logdir}"/> <plugin name="currentbuildstatuslistener" file="${logdir}/buildstatus.html"/> <plugin name="cvs" localworkingcopy="${projectdir}"/> <plugin name="ant" antscript="${env.ANT_HOME}/bin/ant" antWorkingDir="${projectdir}" target="cruise"/> <plugin name="htmlemail" buildresultsurl="http://servername/cruisecontrol/buildresults/${project.name}" mailhost="smtp.example.com" returnaddress="${buildmaster.email}" returnname="${buildmaster.name}" subjectprefix="[BUILD ${project.name}]" xsldir="${reportdir}/jsp/webcontent/xsl" css="${reportdir}/jsp/webcontent/css/cruisecontrol.css"/> <project name="project1"/> <listeners> <currentbuildstatuslistener/> </listeners> <log> <merge dir="${testdir}"> </log> <modificationset> <cvs/> </modificationset> <schedule> <ant/> </schedule> <publishers> <htmlemail> <always address="${buildmaster.email}"> <failure address="proj1dev@example.com"> <ignore address="buildmaster"> </htmlemail> </publishers> </project> <project name="project2"/> <listeners> <currentbuildstatuslistener/> </listeners> <log> <merge dir="${testdir}"> </log> <modificationset> <cvs/> </modificationset> <schedule> <ant/> </schedule> <publishers> <htmlemail> <always address="${buildmaster.email}"> <failure address="proj2dev@example.com"> </htmlemail> </publishers> </project> </cruisecontrol>
<include.projects>
<cruisecontrol> <include.projects>
The <include.projects> tag is used to consolidate several configuration files into a single configuration. One advantage over using XML includes are that the target files are valid configuration files in their own right and not just XML fragments. Also, including projects using the tag is less fragile as an error in one file will not keep the rest of the projects for building.
Configuration files included this way are processed with the properties and plugins defined in the main configuration file, which easily allows per instance configuration. Properties and plugins defined in the processed files are not made available outside the scope of that file.
Project names must still remain unique. The first project with a given name will be loaded and any subsequent projects attempting to use the same name will be skipped.
Changes to any of the included file with be detected and cause the configuration to be reload, just as if they had been made to the parent file.
Attributes
| Attribute | Required | Description |
|---|---|---|
| file | Yes | Relative path from current configuration file to the configuration file to process. |
<project>
<cruisecontrol> <project>
A <project> is the basic unit of work — it
will handle checking for modifications, building, and publishing the
results of your project.
Note: one config.xml file can contain several
<project> elements; these projects will all run in
a shared build queue (see the <threads> element
if you want to build multiple projects at the same time).
Attributes
| Attribute | Required | Description |
|---|---|---|
| name | Yes | Unique identifier for this project |
| buildafterfailed | No (defaults to true) | Should CruiseControl keep on building even though it has failed and no new modifications are detected? This feature is useful if you want CruiseControl to detect situations where a build fails because of outside dependencies (like temporary failing database connection). |
| requireModification | No (defaults to true) | Is a modification required for the build to continue?
Default value is true. Useful to set to false when the schedule
has only time based builds or if you want to run tests to verify
an external resource (such as a database). |
| forceOnly | No (defaults to false) | Indicate that the build for the project only occurs when forced. Note that if the buildAfterFailed attribute is true, then builds will continue to occur based upon the the rules on <schedule> until the build is successful. |
Child Elements
| Element | Cardinality | Description |
|---|---|---|
| <listeners> | 0 .. 1 | Container element for Listener plugin instances. |
| <bootstrappers> | 0 .. 1 | Container element for Bootstrapper plugin instances. |
| <modificationset> | 1 | Container element for SourceControl plugin instances. |
| <schedule> | 1 | Specifies the SourceControl poll interval, and is a parent element for Builder plugin instances. |
| <log> | 0 .. 1 | Specifies where project log files are stored. |
| <publishers> | 0 .. 1 | Container element for Publisher plugin instances. |
| <dateformat> | 0 .. 1 | Overrides the default date format for presentation. |
| <plugin> | 0 .. * | Registers a classname with an alias. |
<listeners>
<cruisecontrol> <project> <listeners>
The <listeners> element is a container element
for Listener plugin instances.
Listeners are notified with every ProjectEvent but most Listeners are designed to handle a specific subclass of ProjectEvent.
Child Elements
| Element | Cardinality | Description |
|---|---|---|
| <currentbuildstatusftplistener> | 0 .. * | Writes a build status snippet to the filesystem and to an FTP server |
| <currentbuildstatuslistener> | 0 .. * | Writes a build status snippet to the filesystem |
| <currentbuildstatuspagelistener> | 0 .. * | Writes build status to the filesystem using by replacing values in a template |
| <cmsynergysessionmonitor> | 0 .. * | Monitors and starts CM Synergy sessions as needed |
| <lockfilelistener> | 0 .. * | Responsible for deleting the lock file when a project goes IDLE |
<cmsynergysessionmonitor>
<cruisecontrol> <project> <listeners> <cmsynergysessionmonitor>
The <cmsynergysessionmonitor> listener will monitor and start CM Synergy sessions as needed. It is triggered with each build loop (before the bootstrappers are run) and can monitor any number of CM Synergy sessions. The <cmsynergysessionmonitor> also provides a mapping between a simple "nick-name" for a session (which is referred to as the "sessionname") and the full CM Synergy session ID. This map is persisted in a simple properties file (referred to as the "session file").
Each time the <cmsynergysessionmonitor> runs, it will load the persisted information from the session file and attempt to verify that each monitored session is, in fact, still running. It does this according to the following rules:
- If the session file does not exist, it will be created.
- If an entry for the session name does not exist in the session file, a new CM Synergy session will be started and an entry recorded in the file.
- If an entry for the session name does exist in the file, it will check that the CM Synergy session ID associated with the session name is still running. If it is, no further action is taken. If it is not, a new CM Synergy session is started, and the new ID recorded in the file.
Attributes
| Attribute | Required | Description |
|---|---|---|
| ccmexe | No | The name of the CM Synergy command line client. If not provided, the plugin will search the system path for an executable called "ccm" (or "ccm.exe" for Windows). |
| sessionfile | No | The session file used to persist the CM Synergy session information. If not provided, it defaults to a file called ".ccmsessionmap" located in your home directory. |
Child Elements
| Element | Cardinality | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <session> | 1 .. * | Defines a CM Synergy session you wish to monitor. The session information may be provided in one of two ways.
|
Examples
- Monitor two sessions. The first will be associated with the database
/ccmdb/product1, the second will use the database /ccmdb/product2.
We will specify all attributes in the config file for the first
session, and use an attribute file called "session2.properties" for
the second. We will accept the default session file location of
".ccmsessionmap" in our home directory. Both sessions will run on
the local host machine.
<listeners> <cmsynergysessionmonitor> <session name="session1" database="/ccmdb/product1" user="buildmgr" role="build_mgr" password="P@ssW0rd!"/> <session name="session2" attributefile="session2.properties"/> <cmsynergysessionmonitor/> <listeners/>Session 2 would then use a properties file as follows:#CM Synergy session properties for "session2" database=/ccmdb/product2 user=buildmgr role=build_mgr password=P@ssW0rd!
<currentbuildstatuslistener>
<cruisecontrol> <project> <listeners> <currentbuildstatuslistener>
The CruiseControl Build Results JSP can indicate whether or not
CruiseControl is currently building a project. To get this information
to the JSP, we can use the optional
<currentbuildstatuslistener> to write an HTML
snippet to disk in a location where the JSP can read it. This file will
consist of the current status of the build and the last time the status
changed, with the formatting set by the
dateformat element.
Attributes
| Attribute | Required | Description |
|---|---|---|
| file | Yes | The filename to write, including path |
<currentbuildstatuspagelistener>
<cruisecontrol> <project> <listeners> <currentbuildstatuspagelistener>
Updates replaceable text in a pattern file each time the Project status changes. Can show full project status history. The following items will be replaced with their values each time they occur in the source file:
- {Project} - Project Name.
- {State.Name} - Name of current project state.
- {State.Description} - Description of current project state.
- {State.Date} - Date/time the current state happened
- {State.Duration} - How long since this state was in effect. (Only useful in {History} line.)
- {History} - Historical states. Must be first on line. This line will be processed and output once for each state the project has previously been in. The {History} tag will be deleted from the line.
A default template is provided of the form "{Project}: {State.Date} - {State.Name}: {State.Description}"
Attributes
| Attribute | Required | Description |
|---|---|---|
| file | Yes | The filename to write, including path |
| sourceFile | No | The file with the template to use for subtitution |
<currentbuildstatusftplistener>
<cruisecontrol> <project> <listeners> <currentbuildstatusftplistener>
This plugin is mostly identical to the
<currentbuildstatuslistener>, to which it adds sending the HTML
snippet to a remote FTP server.
Attributes
| Attribute | Required | Description |
|---|---|---|
| filename | Yes | The filename to write, including path |
| destdir | Yes | The remote directory in which the file will be sent to. |
<lockfilelistener>
<cruisecontrol> <project> <listeners> <lockfilelistener>
This plugin works in conjunction with a <lockfilebootstrapper> to define a set of projects that will not build simultaneously in a multithreaded build environment. This plugin is responsible for deleting the lock file when a project goes IDLE (but only if the lock was created by the same project.
Attributes
| Attribute | Required | Description |
|---|---|---|
| lockfile | Yes | The name (and path) of the file to serve as the lock between multiple projects. |
| projectname | Yes | Lockfile only deleted when contents match the value set for project name. |
<bootstrappers>
<cruisecontrol> <project> <bootstrappers>
The <bootstrappers> element is a container element
for Bootstrapper plugin instances.
Bootstrappers are run before a build takes place, regardless of whether a build is necessary or not, but not if the build is paused. Each bootstrapper element is independent of the others so it is quite possible to have multiple bootstrappers of the same time, say 3 CVS or VssBootstrappers to update 3 different files.
Child Elements
| Element | Cardinality | Description |
|---|---|---|
| <accurevbootstrapper> | 0 .. * | Updates the resources of an Accurev workspace |
| <alienbrainbootstrapper> | 0 .. * | Bootstraps resources from AlienBrain |
| <antbootstrapper> | 0 .. * | Executes an Ant script which implements a custom bootstrapper |
| <clearcasebootstrapper> | 0 .. * | Bootstraps resources from ClearCase |
| <clearcaseviewstrapper> | 0 .. * | Bootstraps View and VOB resources from ClearCase |
| <cmsynergybootstrapper> | 0 .. * | Bootstraps resources from CM Synergy |
| <currentbuildstatusbootstrapper> | 0 .. * | Writes a build status snippet to the filesystem |
| <currentbuildstatusftpbootstrapper> | 0 .. * | Transfers a build status snippet via FTP |
| <cvsbootstrapper> | 0 .. * | Bootstraps resources from CVS |
| <execbootstrapper> | 0 .. * | Execute a command for bootstrapping |
| <lockfilebootstrapper> | 0 .. * | Creates the lock file if it doesn't already exist |
| <p4bootstrapper> | 0 .. * | Bootstraps resources from Perforce |
| <plasticscmbootstrapper> | 0 .. * | Bootstraps resources from Plastic SCM |
| <snapshotcmbootstrapper> | 0 .. * | Bootstraps resources from SnapshotCM |
| <starteambootstrapper> | 0 .. * | Bootstraps resources from Star Team |
| <surroundbootstrapper> | 0 .. * | Bootstraps resources from Surround SCM |
| <svnbootstrapper> | 0 .. * | Bootstraps resources from Subversion |
| <vssbootstrapper> | 0 .. * | Bootstraps resources from Visual Source Safe |
<accurevbootstrapper>
<cruisecontrol> <project> <bootstrappers> <accurevbootstrapper>
Automatically updates an accurev workspace. The selected workspace must already exist on the local filesystem.
Attributes
| Attribute | Required | Description |
|---|---|---|
| keep | No (defaults to "false") | If true, the plugin runs "accurev keep -m" before trying to update the workspace, to keep all modified elements. |
| synctime | No (defaults to "false") | If true, the plugin runs "accurev synctime" before trying to update the workspace, to synchronize the local clock with the Accurev server's. |
| verbose | No (defaults to "false") | Enables detailed logging. |
| workspace | No (defaults to the current dir) | The local path containing the working copy of the desired workspace. |
Examples
- Updates the workspace locally stored on
D:\accurev\workspace_user\MyProject, after synchronizing the local clock with the autokeeping all the modified files.<bootstrappers> <accurevbootstrapper workspace="D:\accurev\workspace_user\MyProject" synctime="true" keep="true" verbose="true"/> <bootstrappers>
<alienbrainbootstrapper>
<cruisecontrol> <project> <bootstrappers> <alienbrainbootstrapper>
Syncs a single path from AlienBrain before the build begins. Useful if you want to leave all SCM up to CruiseControl. Allowing the bootstrapper to update the project makes for a simpler build.xml but allows a window where a file can be committed after the update and before the modification check.
Attributes
| Attribute | Required | Description |
|---|---|---|
| server | No | The name of the machine hosting the AlienBrain repository. If specified, it will override the value in the NXN_AB_SERVER environment variable. |
| database | No | The name of the project in the AlienBrain repository. If specified, it will override the value in the NXN_AB_DATABASE environment variable. |
| user | No | The AlienBrain user account name to use when querying for modifications. If specified, it will override the value in the NXN_AB_USERNAME environment variable. |
| password | No | The password of the AlienBrain user account to use when querying for modifications. If specified, it will override the value in the NXN_AB_PASSWORD environment variable. |
| path | Yes | The path to the item that will be retrieved from AlienBrain. Typically a path like 'alienbrain://Project/SubProject/build.xml' If the path is a file, that file will be retrieved. If the path is a directory, the directory will be retrieved recursively. |
| branch | No | The branch of the project from which to retrieve the path. |
| forcefileupdate | No (defaults to false) | If set to true, the local file is always updated with the file on the server. This is not the same as overwritewritable="replace". It means that the file will be retrieved even if it has not been modified in the repository. |
| overwritewritable | No (defaults to 'skip') | Must be either 'skip' or 'replace'. 'ask' is not an option as no one is around to answer the question.
|
| localpath | No | If localpath is specified the item is copied to the specified local path. |
<antbootstrapper>
<cruisecontrol> <project> <bootstrappers> <antbootstrapper>
Executes an Ant script which implements a custom bootstrapper.
Attributes
The antbootstrapper uses the same attributes as the <ant> builder.Child Elements
The antbootstrapper supports the same set of child elements as the <ant> builder.Examples
- Invoke the ant.bat script distributed with ant, specifying the
working directory as
D:\workspace\MyProjectand the ant build file asMyProject-nightlybuild.xmland the ant target asbootstrap.<bootstrappers> <antbootstrapper antscript="C:\Java\apache-ant-1.6.1\bin\ant.bat" antworkingdir="D:\workspace\MyProject" buildfile="MyProject-nightlybuild.xml" uselogger="true" usedebug="false" target="bootstrap"/> <bootstrappers>
<clearcasebootstrapper>
<cruisecontrol> <project> <bootstrappers> <clearcasebootstrapper>
Can be used to pull a single file (usually build.xml and/or build.properties) from ClearCase prior to building.
Attributes
| Attribute | Required | Description |
|---|---|---|
| file | Yes | The filename to write |
| viewPath | No | local path to the file |
<clearcaseviewstrapper>
<cruisecontrol> <project> <bootstrappers> <clearcaseviewstrapper>
Can be used to automate the start-up of ClearCase Views and VOBs prior to building in dynamic views.
Attributes
| Attribute | Required | Description |
|---|---|---|
| viewpath | Yes | A path into the dynamic view to start-up, i.e. M:\someview\somevob\somepath (Windows) or /view/someview/vobs/somevob/somepath (Linux/Unix). A path is specified rather than a view tag so that you can re-use a CruiseControl property definition. |
| voblist | No | A comma separated list of VOBs to mount, i.e. "\VOB1,\VOB2" (Windows) or "/vobs/VOB1,/vobs/VOB2" (Linux/Unix). |
Examples
- Start the Windows view "j2ee_bld" and mount the VOBs "\J2EE_Sources" and "\J2EE_Binaries":
<property name="dir.j2ee" value="M:\j2ee_bld\J2EE_Sources\src"/> <bootstrappers> <clearcaseviewstrapper viewpath="${dir.j2ee}" voblist="\J2EE_Sources,\J2EE_Binaries"/> <bootstrappers>
<cmsynergybootstrapper>
<cruisecontrol> <project> <bootstrappers> <cmsynergybootstrapper>
Used to reconfigure a CM Synergy project or project hierarchy
Attributes
| Attribute | Required | Description |
|---|---|---|
| ccmexe | No | The name of the CM Synergy command line client. If not provided, the plugin will search the system path for an executable called "ccm" (or "ccm.exe" for Windows). |
| sessionfile | No | The session file used by the <cmsynergysessionmonitor> to persist your CM Synergy session information. If this attribute is not set, it defaults to the file ".ccmsessionmap" in your home directory. |
| sessionname | No | The session name of the CM Synergy session you wish to use. This name must appear in the session file. If not set, the plugin will attempt to use the default (current) session as returned by the "ccm status" command. |
| project | Yes | The project spec (two part name) of the project you wish to reconfigure. |
| recurse | No | If set to true, all subprojects will also be reconfigured. Defaults to true |
Examples
- Reconfigure the "j2ee~1.0_int" project (but not it's subprojects) using
the CM Synergy session named "j2ee_session".
<bootstrappers> <cmsynergybootstrapper project="j2ee~1.0_int" sessionname="j2ee_session" recurse="false"/> <bootstrappers>
<currentbuildstatusbootstrapper>
<cruisecontrol> <project> <bootstrappers> <currentbuildstatusbootstrapper>
Note: this plugin has been made obsolete by the
currentbuildstatuslistener.
The CruiseControl Build Results JSP can indicate whether or not
CruiseControl is currently building a project. To get this information
to the JSP, we can use the optional
<currentbuildstatusbootstrapper> to write an HTML
snippet to disk in a location where the JSP can read it. This file will
consist of the time the build was started with the formatting set by the
dateformat element.
This plugin is used in tandem with the
currentbuildstatuspublisher.
Attributes
| Attribute | Required | Description |
|---|---|---|
| file | Yes | The filename to write, including path |
<currentbuildstatusftpbootstrapper>
<cruisecontrol> <project> <bootstrappers> <currentbuildstatusftpbootstrapper>
Note: this plugin has been made obsolete by the
currentbuildstatusftplistener.
This performs the same action as <currentbuildstatusbootstrapper>,
except that the status file is sent to the remote site via FTP, instead
of being stored locally.
Attributes
In addition to the common FTP attributes,
<currentbuildstatusbootstrapper> uses the following
attributes.
| Attribute | Required | Description |
|---|---|---|
| file | Yes | The filename to write. |
| destDir | Yes | The remote directory (relative to targetDir)
to write the file. |
<cvsbootstrapper>
<cruisecontrol> <project> <bootstrappers> <cvsbootstrapper>
Since there can be a reliance on the build.xml to handle updating
the source code, there has always been a problem with what happens when
the build.xml file itself changes. <cvsbootstrapper>
can solve this problem either by pulling a single file (such as
build.xml) or by updating the entire project. Allowing the bootstrapper
to update the project makes for a simpler build.xml but allows a window
where a file can be committed after the update and before the
modification check.
Attributes
<cvsbootstrapper> requires at least one of its
attributes to be set.
| Attribute | Required | Description |
|---|---|---|
| localWorkingCopy | No | Path (absolute or relative to Build Loop execution directory) to the local copy of the CVS module which contains the target file. CVSBootstrapper will execute the update command from this directory if specified. Defaults to Build Loop execution directory. |
| cvsroot | No | The CVSROOT. Not required if the current working directory is in the cvs project or if the localWorkingCopy attribute is set. |
| file | No | The file to update from CVS, relative to localworkingcopy. If not specified either the current working directory must be in the local cvs project or the localWorkingCopy must be set. |
| overwriteChanges | No | If set to true the update command will include the -C option which will overwrite local changes. |
| resetStickyTags | No | If set to true the update command will include the -A option which will reset any sticky tags, dates, or -k options. |
<execbootstrapper>
<cruisecontrol> <project> <bootstrappers> <execbootstrapper>
This bootstrapper executes a command. As it is based on the ExecBuilder, it has the same attributes
<lockfilebootstrapper>
<cruisecontrol> <project> <bootstrappers> <lockfilebootstrapper>
This plugin works in conjunction with a <lockfilelistener> to define a set of projects that will not build simultaneously in a multithreaded build environment. This plugin is responsible for creating the lock file if it doesn't already exist, or if it does, to throw an exception to abort the build attempt. When a build attempt is aborted the project will not be retried until the next build time as determined by the schedule interval or the schedule build time.
Attributes
| Attribute | Required | Description |
|---|---|---|
| lockfile | Yes | The name (and path) of the file to serve as the lock between multiple projects. |
| projectname | Yes | The project name is written to the lockfile so that the LockFileListener knows which to delete. |
<p4bootstrapper>
<cruisecontrol> <project> <bootstrappers> <p4bootstrapper>
Syncs a single path from Perforce before the build begins. Useful if you want to leave all SCM up to CruiseControl. Allowing the bootstrapper to update the project makes for a simpler build.xml but allows a window where a file can be committed after the update and before the modification check.
Setting the path to a complete P4 depot ending with a typical
triple dot (...) will synch all the files, e.g. //depot/myproject/...
Note that the attributes path, p4Port, p4User, and p4Client are deprecated. Please use the attributes listed below.
Attributes
| Attribute | Required | Description |
|---|---|---|
| view | Yes | Valid Perforce path (a.k.a. 'view') |
| port | No | Perforce Server connection to use (host:port) |
| user | No | Perforce User name to use |
| passwd | No | Perforce password to use |
| client | No | Perforce Client name to use |
<plasticscmbootstrapper>
<cruisecontrol> <project> <bootstrappers> <plasticscmbootstrapper>
Automatically updates the workspace before the build begins. The selected workspace must already exist on the local filesystem.
Attributes
| Attribute | Required | Description |
|---|---|---|
| wkspath | Yes | Valid Plastic SCM workspace path. |
| branch | No | The branch from which to get the source. If none has been specified, it updates the workspace according to its configuration. |
| repository | No | The repository from which to get the source. If none has been specified, it updates the workspace according to its configuration. |
| pathtoupdate | No | A path under the workspace path which will be updated. If none is specied, it updates all the workspace. |
| forced | No (defaults to "false") | Do the update with the "--forced" option |
Examples
- Update the workspace (using the option forced) in the path in c:\work\cruise\plasticwks setting the branch "br:/main" as working branch.
<bootstrappers> <plasticscmbootstrapper wkspath="c:\work\cruise\plasticwks" branch="br:/main" forced="yes" /> <bootstrappers>
<snapshotcmbootstrapper>
<cruisecontrol> <project> <bootstrappers> <snapshotcmbootstrapper>
Can be used to pull a single file (usually build.xml and/or build.properties) or directory from SnapshotCM prior to building.
Attributes
| Attribute | Required | Description |
|---|---|---|
| file | Yes | Name of the file or directory to fetch from the SnapshotCM repository. Updates from SnapshotCM repository will be recursive and forced (over-writing any local changes). |
<starteambootstrapper>
<cruisecontrol> <project> <bootstrappers> <starteambootstrapper>
Handles updating multiple files (space separated list) from StarTeam before the build begins.
Attributes
| Attribute | Required | Description |
|---|---|---|
| files | Yes | Space separated list of files to retrieve |
| folder | Yes | The repository folder |
| localfolder | No | Path to the folder on the local file system |
| password | Yes | |
| port | Yes | Port StarTeam server is using |
| project | Yes | StarTeam project |
| server | Yes | Hostname for StarTeam server |
| username | Yes | |
| view | Yes | StarTeam view |
<surroundbootstrapper>
<cruisecontrol> <project> <bootstrappers> <surroundbootstrapper>
Fetches a single repository (and optionally it's sub-repositories) from Surround SCM before starting the build.
Attributes
| Attribute | Required | Description |
|---|---|---|
| branch | No | Surround SCM branch name. The default is pulled from the local working directory. |
| repository | No | Surround SCM repository path. The default is pulled from the local working directory. |
| label | No | Enter a label to search for when getting files. |
| includeremovedfiles | No | Include removed files when getting files by label or timestamp. Default is true. Ignored if a label is not specified. Options are 1 or 0 (default). |
| overwrite | No | Enter how to handle a local writable file. Options are 1 to overwrite or 0 (default) to skip. |
| recursive | No | Recursively get files and sub-repositories. Options are 1 or 0 (default). |
| forcefetch | No | Force file retrieval from server regardless of the local copy status. Options are 1 or 0 (default). |
| makewritable | No | Make local file editable or writable. Default is read-only. Options are 1 or 0 (default). |
| serverconnect | No | Enter the address and port number of the Surround SCM server host computer. Format is server:port. If not entered, the last saved connection parameters are used. |
| serverlogin | No | Enter the username and password used to login to the Surround SCM server. Format is username:password. If not entered, the last saved login parameters are used. |
<svnbootstrapper>
<cruisecontrol> <project> <bootstrappers> <svnbootstrapper>
Handles updating a single file (typically build.xml and/or build.properties) from a Subversion repository before the build begins.
Attributes
| Attribute | Required | Description |
|---|---|---|
| localWorkingCopy | One of these | the relative or absolute path to the local working copy of the Subversion repository on which to execute the update command. |
| file | file to update from the Subversion repository. | |
| username | No | used for authentication. |
| password | No | used for authentication. |
| checkExternals | No | whether any subversion externals this project uses should also be checked for modifications. |
<vssbootstrapper>
<cruisecontrol> <project> <bootstrappers> <vssbootstrapper>
Handles updating a single file (typically build.xml and/or build.properties) from VSS before the build begins.
Attributes
| Attribute | Required | Description |
|---|---|---|
| vsspath | Yes | Fully qualified VSS path to the target file. If the leading
dollar-sign ['$'] is omitted, one will be prepended
automatically. Example: /Project/subproject/filename.ext |
| localdirectory | Yes | Fully qualified path for the destination directory. Example: c:\directory\subdirectory\ |
| login | No | VSS login information in the form username,password |
| ssdir | No | Path to the directory containing ss.exe. By default, ss.exe
is assumed to be in the path. Note: should not contain whitespace. |
| serverpath | No | Path to the directory containing srcsafe.ini. |
<modificationset>
<cruisecontrol> <project> <modificationset>
A container element for a set of modifications collected from all
included SourceControl elements. <modificationset>
can contain multiple elements which can be useful to check only parts
of a large project rather than checking all files every time.
Most SourceControl elements support the property
/propertyOnDelete attributes which can allow for
conditional building that may greatly speed the feedback cycle.
Attributes
| Attribute | Required | Description |
|---|---|---|
| requiremodification | No (defaults to true) | Is a modification required for the build to continue?
Default value is true. Useful to set to false when the schedule
has only time based builds or if you want to run tests to verify
an external resource (such as a database). NOTE - This attribute
will be going away. Use the requireModification attribute that is on the
project tag instead. |
| quietperiod | No (defaults to 60) | The number of seconds required to have passed since the last modification before a build can commence. This attribute is used to avoid starting a build while someone is in mid-checkin. If a modification is detected to be within the quiet period then CC will sleep until the quiet period is finished and then recheck for modifications. Small values recommended if you use a bootstrapper to sync files (as opposed to getting updates as part of the build). 0 is a valid value and recommended for version control systems such as Perforce and Subversion with atomic commits. |
| ignoreFiles | No | Specify a comma separated list of glob-patterns identify files to be ignored in modificationsets.
Each pattern is matched against the complete path.
Example: *.txt,*/build/build.xmlThis is useful if you want to update and commit files during your CC build. |
Child Elements
| Element | Cardinality | Description |
|---|---|---|
| <accurev> | 0 .. * | Checks for changes in an AccuRev stream. |
| <alienbrain> | 0 .. * | Checks for changes in an AlienBrain repository. |
| <alwaysbuild> | 0 .. * | Always returns a single modification so the build will be run. |
| <buildstatus> | 0 .. * | Checks for a successful build in another project. |
| <clearcase> | 0 .. * | Checks for changes in a ClearCase repository. |
| <cmsynergy> | 0 .. * | Checks for changes in a CM Synergy repository. |
| <compound> | 0 .. * | Checks for changes from a list of trigger source controls, and if modification are detected, returns changes from a list of target source controls. |
| <cvs> | 0 .. * | Checks for changes in a CVS repository. |
| <filesystem> | 0 .. * | Checks for changes in a file system. |
| <forceonly> | 0 .. * | Never returns any changes; use this to define a project that only builds when forced to. |
| <harvest> | 0 .. * | Checks for changes in an All Fusion Harvest CM511 repository. |
| <httpfile> | 0 .. * | Checks for changes in a remote file via http. |
| <mks> | 0 .. * | Checks for changes in a MKS repository. |
| <p4> | 0 .. * | Checks for changes in a Perforce repository. |
| <plasticscm> | 0 .. * | Checks for changes in a Plastic SCM branch. |
| <pvcs> | 0 .. * | Checks for changes in a PVCS repository. |
| <snapshotcm> | 0 .. * | Checks for changes in a SnapshotCM repository. |
| <starteam> | 0 .. * | Checks for changes in a Star Team repository. |
| <surround> | 0 .. * | Checks for changes in a Surround SCM repository. |
| <svn> | 0 .. * | Checks for changes in a Subversion repository. |
| <timebuild> | 0 .. * | Triggers a build after a particular time threshold. |
| <veto> | 0 .. * | Checks for changes in another project and will veto a build if changes are found. |
| <vss> | 0 .. * | Checks for changes in a Visual SourceSafe repository. |
| <vssjournal> | 0 .. * | Checks for changes in a Visual SourceSafe, Journal File Implementation. |
<accurev>
<cruisecontrol> <project> <modificationset> <accurev>
Checks for modifications in an AccuRev stream.
Attributes
| Attribute | Required | Description |
|---|---|---|
| stream | Yes | The name of the AccuRev stream where the plugin looks for Modification(s). |
| verbose | No (defaults to "false") | Set to "true" to enable a more verbose logging style. |
| property | No | Will set this property if a modification has occurred. For use in conditionally controlling the build later. |
<alienbrain>
<cruisecontrol> <project> <modificationset> <alienbrain>
Triggers a build if there is a change in an AlienBrain repository.
Changes are detected by running a command similar to the following:
ab find PathToProject -regex "SCIT > lastbuildtime"
Attributes
| Attribute | Required | Description |
|---|---|---|
| server | No | The name of the machine hosting the AlienBrain repository. If specified, it will override the value in the NXN_AB_SERVER environment variable. |
| database | No | The name of the project in the AlienBrain repository. If specified, it will override the value in the NXN_AB_DATABASE environment variable. |
| user | No | The AlienBrain user account name to use when querying for modifications. If specified, it will override the value in the NXN_AB_USERNAME environment variable. |
| password | No | The password of the AlienBrain user account to use when querying for modifications. If specified, it will override the value in the NXN_AB_PASSWORD environment variable. |
| path | Yes | The path to the item that will be queried for modifications Typically a path like 'alienbrain://Project/SubProject' |
| branch | No | The branch of the project to check for modifications. |
| property | No | Will set this property if a modification has occurred. For use in conditionally controlling the build later. |
<alwaysbuild>
<cruisecontrol> <project> <modificationset> <alwaysbuild>
Used to always trigger a build by returning a single modification.
Attributes
| Attribute | Required | Description |
|---|---|---|
| username | No (defaults to "User") | The username to use for the single reported (fake) Modification. |
| property | No | Set this property if a modification has occurred. For use in conditionally controlling the build later. |
<buildstatus>
<cruisecontrol> <project> <modificationset> <buildstatus>
Used to trigger a build when another CruiseControl project has a successful build. When triggered, this will report a modification with action "add", the successfully built project's logfile, the name of the successfully built project's log directory (the final component of attribute logdir), and the username set to "cc-" + name of the successfully built project. You may need make an alias for this username if you are using an <email> publisher.
Attributes
| Attribute | Required | Description |
|---|---|---|
| logdir | Yes | Path to CruiseControl log directory for the project to monitor. |
| property | No | Will set this property if a modification has occurred. For use in conditionally controlling the build later. |
Properties Passed to the Builders
In addition to the standard CruiseControl properties passed to builders, <buildstatus> sets the following properties:
| Property Name | Description |
|---|---|
| most.recent.logdir | The location being checked for new log files |
| most.recent.logfile | The name of the newest logfile included in the modification set |
| most.recent.logtime | The timestamp of the newest build included in the
modification set, using the format
yyyyMMddHHmmss |
| most.recent.loglabel | The label of the newest build included in the modification set |
<clearcase>
<cruisecontrol> <project> <modificationset> <clearcase>
Triggers a build if there is a change within a ClearCase repository.
Attributes
| Attribute | Required | Description |
|---|---|---|
| branch | Yes | The ClearCase branch |
| recursive | No (defaults to true) | Whether to check sub-folders in the viewpath. |
| all | No (defaults to false) | Set when checking the entire view path.
When checking the entire view path this option invokes 'lshistory -all'
instead of 'lshistory -recursive', which is much faster. This option is mutually exclusive with the recursive property. Note that 'all' does not use your view's config-spec rules. It behaves like having a single line config-spec that selects just ELEMENT * /<branch>/LATEST (i.e. 'lshistory -all' results that contain @@ are discarded). This differs from 'recurse', which only shows items selected by your current view. |
| viewpath | Yes | Local working copy to use when making queries |
| property | No | Will set this property if a modification has occurred. For use in conditionally controlling the build later. |
Properties Passed to the Builders
In addition to the standard CruiseControl properties passed to builders, <clearcase> sets the following properties:
| Property Name | Description |
|---|---|
| clearcaselastbuild | Timestamp representing the last built time, using the
format dd-MMMM-yyyy.HH:mm:ss |
| clearcasenow | Timestamp representing the time the current build
started, using the format dd-MMMM-yyyy.HH:mm:ss |
<cmsynergy>
<cruisecontrol> <project> <modificationset> <cmsynergy>
Triggers a build if tasks have been added to any folder within a CM Synergy project's reconfigure properties since the last build.
Attributes
| Attribute | Required | Description |
|---|---|---|
| ccmexe | No | The name of the CM Synergy command line client. If not provided, the plugin will search the system path for an executable called "ccm" (or "ccm.exe" for Windows). |
| sessionfile | No | The session file used by the <cmsynergysessionmonitor> to persist your CM Synergy session information. If this attribute is not set, it defaults to the file ".ccmsessionmap" in your home directory. |
| sessionname | No | The session name of the CM Synergy session you wish to use. This name must appear in the session file. If not set, the plugin will attempt to use the default (current) session as returned by the "ccm status" command. |
| project | Yes | The project spec (two part name) of the CM Synergy project in which you wish to search for changes. |
| instance | No | Used to set the project's instance value. As CM Synergy only allows a single instance of a project object in any given database, this attribute defaults to "1", and should not need to be changed by most users. You might, however, need to set this value when using the DCM (Distributed Change Management) feature of the tool - which appends the DB name to the instance value. |
| ccmdateformat | No | The default (output) date format used by CM Synergy is "EEE MMM dd HH:mm:ss yyyy" If you have customized this for your installation, you must provide the correct format here. The format should follow the standard defined in Java's SimpleDateFormat class. |
| updatefolders | No | By default, the plugin will always refresh the reconfigure properties of the given project before searching for changes. This allows any query based folders to update themselves with new tasks. If you wish to disable this feature (not recommended), you may set this attribute to false. This feature will only work with CM Synergy version 6.3 and above. If you are using an older version, you must set this option to false. In this case, you'll want to use the <cmsynergybootstrapper> as a workaround. Please see example 2 below as well as the Wiki site for more information. |
| reconfigure | No | Disabled by default. If you set this option to true, the project (and optionally any subprojects) will be automatically reconfigured when changes are detected. This eliminates the need to handle this from within your build scripts. |
| recurse | No | Used in conjunction with the reconfigure option. If set to true (which is the default) all subprojects will also be reconfigured. |
| ignoreworkarea | No | By default, the plugin will query CM Synergy to determine the work area location of the project. This location is then passed to the builders in the property "cc.ccm.workarea". If you wish to disable this feature (not recommended), you can set this attribute to true. |
| changesynergyurl | No | If provided, an active link will be created from the build results web page to any change requests associated with any new tasks. The format should be "http://server:port". If you wish to use this option, you must also set the ccmdb attribute. |
| ccmdb | No | Used in conjunction with changesynergyurl. This should be set to the location of the database on the CM Synergy server. (e.g. "/ccmdb/mydb") |
| language | No | If you have a non U.S. English installation of CM Synergy, you may specify the ISO language code here. (e.g. fr, de, etc.) |
| country | No | If you have a non U.S. English installation of CM Synergy, you may specify the ISO country code here. (e.g. FR, DE, etc.) |
| property | No | Added for compliance with the CruiseControl API. A property of this name will be provided to the builders if any CM Synergy object has changed since the last build. The default is cc.ccm.haschanged, and probably shouldn't be altered. |
Properties Passed to the Builders
In addition to the standard CruiseControl properties passed to builders, <cmsynergy> sets the following properties:
| Property Name | Description |
|---|---|
| cc.ccm.session | The CM Synergy session ID used to check for modifications. |
| cc.ccm.dateformat | The date format used to convert CM Synergy dates into Java dates. |
| cc.ccm.project | The two part name of the project (as provided in the project attribute). |
| cc.ccm.workarea | The file system location of the CM Synergy work area for the project (unless the ignoreworkarea attribute was set). |
| cc.ccm.haschanged (or the value specified by the property attribute) | Set to true if any CM Synergy objects have changed since the last build. |
Examples
- Use the session named "j2ee_session" to check for changes within the
"j2ee~1.0_int" project. If any changes are detected, reconfigure the
project and all of it's subprojects.
<modificationset> <cmsynergy project="j2ee~1.0_int" sessionname="j2ee_session" reconfigure="true"/> <modificationset/> - For users of CM Synergy older than version 6.3 only. Use the
<cmsynergybootstrapper>
to reconfigure only the top level "j2ee~1.0_int" project. This will
update the folders within that project's reconfigure properties.
We can then check for changes just as we did in the first example.
Notice that we must set the "updatefolder" attribute to false.
<bootstrappers> <cmsynergybootstrapper project="j2ee~1.0_int" sessionname="j2ee_session" recurse="false"/> <bootstrappers> <modificationset> <cmsynergy project="j2ee~1.0_int" updatefolders="false" sessionname="j2ee_session" reconfigure="true"/> <modificationset/>
<compound>
<cruisecontrol> <project> <modificationset> <compound>
Contains two separate lists of source controls:
<triggers> and <targets>. Triggers
are checked for modifications every scheduled poll. Targets are
only checked for modifications if there was any modifications detected
in the triggers.
Arbitrary nesting of source controls under <triggers>
and <targets> is possible.
The <compound> element allows optimized access to
source repositories, avoiding a full scan of the repository every
scheduled interval. A typical usage scenario is to configure the source
repository to update a single file after a commit, meaning that only a
single file need be checked in the triggers section.
In addition to the modifications returned by the target source controls all of their properties are returned as well. If includeTriggerChanges is set then the properties returned by the triggers are returned as well.
Attributes
| Attribute | Required | Description |
|---|---|---|
| includeTriggerChanges | No (defaults to false) | Add the trigger modifications to the list of returned
modifications? By default, the list of returned modifications
only includes the source controls from the
<targets> element. By setting this attribute
to true, the list of modifications will include both
<triggers> and <targets>
modifications. |
| property | No | Set this property if a modification has occurred. For use in conditionally controlling the build later. |
Child Elements
| Element | Cardinality | Description |
|---|---|---|
<triggers> |
1 | A container for one or more source control elements that
trigger a full check of the targets. Any child element of
<modificationset>
can be used as a child element of <triggers>. |
