May 7, 2007

CruiseControl.NET Example

Surround SCM
Here is an example configuration file for CruiseControl.Net

Example ccnet.config

  <project name="SurroundSCM_WithNUnit" webURL="http://localhost/ccnet">
    <sourcecontrol type="surround">
   <executable>E:Program FilesSeapineSurround SCMsscm.exe</executable>
    	<nunit path="C:Program FilesNUnit 2.4binnunit-console.exe">
    			<assembly>C:Program FilesNUnit 2.4binmock-assembly.dll</assembly>
      <xmllogger logDir="log" />


Branching and Labeling

Because of the way that Integration Properties work, it is best to use a batch file to create a branch or label after build and unit tests have been completed. This is because those variables cannot be used in the config file directly but will be expanded when you execute from batch. A batch file might look like this: sscm mb "SSCMClone - %CCNetBuildDate%" "Programs/SSCM/SSCMClone" -bPrograms -cc"CC.NET Build" -ssnapshot -ybuildbot:builder -z198.187.16.177:4900 Creating a label would be done in similar fashion only using the label command instead of the make branch command.

User Security

The buildbot user in this example has read-only access at the file level. The user has create branch rights but can only login from the CLI. This is necessary because the username and password will be displayed in plain text in the build reports and any batch files used to create snapshots or labels. This allows the user to get the latest source code and create the snapshot branch, while preventing users who know the login credentials from performing other activities like a check in, rename, or remove. The Surround SCM security group set up can be configured to meet any need, so the user can perform additional operations if the group settings allow it. Note: Seapine does not provide support for sample triggers and scripts.