<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>CruiseControl.Net</title>
        <link>http://geekswithblogs.net/EltonStoneman/category/7944.aspx</link>
        <description>Continuous intgeration server</description>
        <language>en-GB</language>
        <copyright>EltonStoneman</copyright>
        <managingEditor>elton.stoneman@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Sample CruiseControl build using Perforce</title>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2008/05/29/sample-cruisecontrol-build-using-perforce.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;Tim asked for some more detail on using Perforce as your SCM for CruiseControl from &lt;a href="http://geekswithblogs.net/EltonStoneman/archive/2008/04/04/using-perforce-with-cruisecontrol.net.aspx"&gt;this post&lt;/a&gt;, so here are some sample config files. This post may be too detailed for a general audience… &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;&lt;em&gt;Perforce Setup –  Build Server Workspace &lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="font-family: Arial;"&gt;You'll need a dedicated workspace for the build server to use – this will be used by CC.Net to check for changes and to resync. You don't need a separate user account, so it can be created with the build manager as the owner. You'll define the location to monitor in the CC.Net config, so the workspace only needs a view over the root project. So you may create a workspace called &lt;strong&gt;build.server&lt;/strong&gt; with a view of &lt;/span&gt;&lt;span style="font-family: Courier New;"&gt;//depot/… //build.server/…&lt;/span&gt;&lt;span style="font-family: Arial;"&gt; (while you're setting this up you can use it from your dev machine with a different root from your normal workspace, then change the host to be the build server when your scripts are finished). &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;&lt;em&gt;CruiseControl setup - CCNet.config&lt;/em&gt;&lt;/span&gt; 		&lt;br /&gt;
&lt;span style="font-family: Arial; font-size: 10pt;"&gt; &lt;/span&gt; 		&lt;br /&gt;
&lt;span style="font-family: Arial; font-size: 10pt;"&gt;This sample config uses the build server's workspace to monitor //depot/ProjectX/MAIN/source (assumes the workspace depot is c:\depot): &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;span style="font-family: Courier New; font-size: 9pt;"&gt;&amp;lt;cruisecontrol&amp;gt; &lt;br /&gt;
  &amp;lt;project name="ProjectX"&amp;gt; &lt;br /&gt;
    &amp;lt;sourcecontrol type="p4"&amp;gt; &lt;br /&gt;
      &amp;lt;view&amp;gt;//depot/ProjectX/MAIN/source...&amp;lt;/view&amp;gt; &lt;br /&gt;
      &amp;lt;client&amp;gt;build.server&amp;lt;/client&amp;gt; &lt;br /&gt;
      &amp;lt;applyLabel&amp;gt;true&amp;lt;/applyLabel&amp;gt; &lt;br /&gt;
      &amp;lt;autoGetSource&amp;gt;true&amp;lt;/autoGetSource&amp;gt; &lt;br /&gt;
    &amp;lt;/sourcecontrol&amp;gt; &lt;br /&gt;
    &amp;lt;workingDirectory&amp;gt;C:\depot\ProjectX\MAIN\source&amp;lt;/workingDirectory&amp;gt; &lt;br /&gt;
    &amp;lt;webURL&amp;gt;&lt;a href="http://localhost/ccnet"&gt;http://localhost/ccnet&lt;/a&gt; &amp;lt;/webURL&amp;gt; &lt;br /&gt;
    &amp;lt;artifactDirectory&amp;gt;C:\buildOutput\ProjectX\artifacts&amp;lt;/artifactDirectory&amp;gt; &lt;br /&gt;
    &amp;lt;modificationDelaySeconds&amp;gt;5&amp;lt;/modificationDelaySeconds&amp;gt; &lt;br /&gt;
    &amp;lt;triggers&amp;gt; &lt;br /&gt;
      &amp;lt;intervalTrigger name="continuous" seconds="10"/&amp;gt; &lt;br /&gt;
    &amp;lt;/triggers&amp;gt; &lt;br /&gt;
    &amp;lt;state type="state" directory="C:\buildOutput\ProjectX\artifacts" /&amp;gt; &lt;br /&gt;
    &amp;lt;labeller type="iterationlabeller"&amp;gt; &lt;br /&gt;
      &amp;lt;prefix&amp;gt;1.1&amp;lt;/prefix&amp;gt; &lt;br /&gt;
      &amp;lt;duration&amp;gt;4&amp;lt;/duration&amp;gt; &lt;br /&gt;
      &amp;lt;releaseStartDate&amp;gt;2008/5/29&amp;lt;/releaseStartDate&amp;gt; &lt;br /&gt;
      &amp;lt;separator&amp;gt;.&amp;lt;/separator&amp;gt; &lt;br /&gt;
    &amp;lt;/labeller&amp;gt; &lt;br /&gt;
    &amp;lt;tasks&amp;gt; &lt;br /&gt;
      &amp;lt;msbuild&amp;gt; &lt;br /&gt;
        &amp;lt;executable&amp;gt;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe&amp;lt;/executable&amp;gt; &lt;br /&gt;
        &amp;lt;projectFile&amp;gt;build\ProjectX.build&amp;lt;/projectFile&amp;gt; &lt;br /&gt;
        &amp;lt;targets&amp;gt;FullBuild&amp;lt;/targets&amp;gt; &lt;br /&gt;
        &amp;lt;buildArgs&amp;gt;/noconsolelogger /p:Configuration=Debug /verbosity:minimal&amp;lt;/buildArgs&amp;gt; &lt;br /&gt;
        &amp;lt;logger&amp;gt;C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll&amp;lt;/logger&amp;gt; &lt;br /&gt;
      &amp;lt;/msbuild&amp;gt; &lt;br /&gt;
    &amp;lt;/tasks&amp;gt; &lt;br /&gt;
  &amp;lt;/project&amp;gt; &lt;br /&gt;
&amp;lt;/cruiseControl&amp;gt; &lt;br /&gt;
&lt;/span&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt; &lt;/span&gt; 		&lt;br /&gt;
&lt;span style="font-family: Arial; font-size: 10pt;"&gt;This tells CC to connect to Perforce in the build.server workspace, and monitor all files under //depot/ProjectX/MAIN/source. When it finds a change, it will resynchronise (bringing the build server's copy of the source up to date), determine a label for the build, and start the FullBuild target in the MSBuild file. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;If the build is successful, the label is applied to all files in the view, so Perforce is stamped with a label for every successful build (this means at any time we can create a branch for a specific build which we know will work). There's no publishing here, but you typically configure CCNet to issue build failure mails to people/lists named in the project. &lt;/span&gt; 	&lt;/p&gt;
&lt;p&gt;For multiple projects in the same &lt;span style="font-family: Arial; font-size: 10pt;"&gt;CCNet config, you can use the same workspace but specify a different view. &lt;/span&gt; 		&lt;br /&gt;
&lt;span style="font-family: Arial; font-size: 10pt;"&gt; &lt;/span&gt; 		&lt;br /&gt;
&lt;span style="font-family: Arial; font-size: 10pt;"&gt;&lt;em&gt;MSBuild setup – projectX.build&lt;/em&gt;&lt;/span&gt; 	&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;The build file specifies targets as entry points. Targets can contain other targets, so typically the build process will be split into component parts which are brought together by composite targets. A sample build file split like this is:&lt;/span&gt; 	&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 9pt;"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt; &lt;br /&gt;
&amp;lt;Project xmlns="&lt;a href="http://schemas.microsoft.com/developer/msbuild/2003"&gt;http://schemas.microsoft.com/developer/msbuild/2003&lt;/a&gt;" DefaultTargets="FullBuild"&amp;gt; &lt;br /&gt;
  &amp;lt;!-- MSBuild extensions required; use installer from Prerequisites--&amp;gt; &lt;br /&gt;
  &amp;lt;Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/&amp;gt; &lt;br /&gt;
  &amp;lt;!-- Properties--&amp;gt; &lt;br /&gt;
  &amp;lt;PropertyGroup&amp;gt; &lt;br /&gt;
    &amp;lt;Configuration Condition=" '$(Configuration)' == '' "&amp;gt;Debug&amp;lt;/Configuration&amp;gt; &lt;br /&gt;
    &amp;lt;OutputDir&amp;gt;bin\$(Configuration)&amp;lt;/OutputDir&amp;gt; &lt;br /&gt;
    &amp;lt;ObjOutputDir&amp;gt;obj\$(Configuration)&amp;lt;/ObjOutputDir&amp;gt; &lt;br /&gt;
    &amp;lt;ProjectDir&amp;gt;..\ProjectX&amp;lt;/ProjectDir &amp;gt; &lt;br /&gt;
    &amp;lt;ProjectTestDir&amp;gt;..\ProjectX.Test&amp;lt;/ProjectTestDir &amp;gt; &lt;br /&gt;
    &amp;lt;ProjectFile&amp;gt;$(ProjectDir)\ProjectX.csproj&amp;lt;/ProjectFile &amp;gt; &lt;br /&gt;
    &amp;lt;TestProjectFile&amp;gt;$(ProjectTestDir)\ProjectX.Test.csproj&amp;lt;/TestProjectFile &amp;gt; &lt;br /&gt;
    &amp;lt;ExcludeTestCategories&amp;gt;InProgress,LongRunning&amp;lt;/ExcludeTestCategories&amp;gt; &lt;br /&gt;
    &amp;lt;Version Condition=" '$(CCNetLabel)' == '' "&amp;gt;1.0.0.0&amp;lt;/Version&amp;gt; &lt;br /&gt;
    &amp;lt;NUnitOutputXmlFile&amp;gt;C:\buildOutput\ProjectX\artifacts\testResults_$(Version).xml&amp;lt;/NUnitOutputXmlFile&amp;gt; &lt;br /&gt;
  &amp;lt;/PropertyGroup&amp;gt; &lt;br /&gt;
  &amp;lt;!-- Default entry point, builds &amp;amp; runs all Continuous tests--&amp;gt; &lt;br /&gt;
  &amp;lt;Target Name="FullBuild"&amp;gt; &lt;br /&gt;
    &amp;lt;CallTarget Targets="BuildNoTests"/&amp;gt; &lt;br /&gt;
    &amp;lt;CallTarget Targets="UnitTestContinuous"/&amp;gt; &lt;br /&gt;
    &amp;lt;CallTarget Targets="Package" /&amp;gt; &lt;br /&gt;
  &amp;lt;/Target&amp;gt; &lt;br /&gt;
  &amp;lt;Target Name="BuildNoTests"&amp;gt; &lt;br /&gt;
    &amp;lt;CallTarget Targets="Build"/&amp;gt; &lt;br /&gt;
    &amp;lt;CallTarget Targets="PostBuild"/&amp;gt; &lt;br /&gt;
  &amp;lt;/Target&amp;gt; &lt;br /&gt;
  &amp;lt;ItemGroup&amp;gt; &lt;br /&gt;
    &amp;lt;OutputDirectory Include="d1"&amp;gt; &lt;br /&gt;
      &amp;lt;DirectoryName&amp;gt; &lt;br /&gt;
        $(ProjectDir)\$(OutputDir) &lt;br /&gt;
      &amp;lt;/DirectoryName&amp;gt; &lt;br /&gt;
    &amp;lt;/OutputDirectory&amp;gt; &lt;br /&gt;
    &amp;lt;OutputDirectory Include="d2"&amp;gt; &lt;br /&gt;
      &amp;lt;DirectoryName&amp;gt; &lt;br /&gt;
        $(ProjectDir)\$(ObjOutputDir)&amp;lt;/DirectoryName&amp;gt; &lt;br /&gt;
    &amp;lt;/OutputDirectory&amp;gt; &lt;br /&gt;
    &amp;lt;OutputDirectory Include="d3"&amp;gt; &lt;br /&gt;
      &amp;lt;DirectoryName&amp;gt;$(ProjectTestDir)\$(OutputDir)&amp;lt;/DirectoryName&amp;gt; &lt;br /&gt;
    &amp;lt;/OutputDirectory&amp;gt; &lt;br /&gt;
    &amp;lt;OutputDirectory Include="d4"&amp;gt; &lt;br /&gt;
      &amp;lt;DirectoryName&amp;gt;$(ProjectTestDir)\$(ObjOutputDir)&amp;lt;/DirectoryName&amp;gt; &lt;br /&gt;
    &amp;lt;/OutputDirectory&amp;gt; &lt;br /&gt;
  &amp;lt;/ItemGroup&amp;gt; &lt;br /&gt;
  &amp;lt;ItemGroup&amp;gt; &lt;br /&gt;
    &amp;lt;ProjectDirectory Include="p1"&amp;gt; &lt;br /&gt;
      &amp;lt;DirectoryName&amp;gt;$(ProjectDir)&amp;lt;/DirectoryName&amp;gt; &lt;br /&gt;
    &amp;lt;/ProjectDirectory&amp;gt; &lt;br /&gt;
    &amp;lt;ProjectDirectory Include="p2"&amp;gt; &lt;br /&gt;
      &amp;lt;DirectoryName&amp;gt;$(ProjectTestDir)&amp;lt;/DirectoryName&amp;gt; &lt;br /&gt;
  &amp;lt;/ProjectDirectory&amp;gt; &lt;br /&gt;
  &amp;lt;/ItemGroup&amp;gt; &lt;br /&gt;
  &amp;lt;Target Name="CleanDirectories"&amp;gt; &lt;br /&gt;
    &amp;lt;Attrib Directories="%(OutputDirectory.DirectoryName)" ReadOnly="false" ContinueOnError="true"/&amp;gt; &lt;br /&gt;
    &amp;lt;RemoveDir Directories="%(OutputDirectory.DirectoryName)" ContinueOnError="true"/&amp;gt; &lt;br /&gt;
  &amp;lt;/Target&amp;gt; &lt;br /&gt;
  &amp;lt;Target Name="SetAssemblyVersions"&amp;gt; &lt;br /&gt;
    &amp;lt;Attrib Files="%(ProjectDirectory.DirectoryName)\Properties\AssemblyInfo.cs" ReadOnly="false"/&amp;gt; &lt;br /&gt;
    &amp;lt;AssemblyInfo CodeLanguage="CS" OutputFile="%(ProjectDirectory.DirectoryName)\Properties\AssemblyInfo.cs" AssemblyVersion="$(Version)" AssemblyFileVersion="$(Versiom)" /&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 9pt;"&gt;  &amp;lt;/Target&amp;gt; &lt;br /&gt;
  &amp;lt;!--Setup tasks prior to build--&amp;gt; &lt;br /&gt;
  &amp;lt;Target Name="PreBuild"&amp;gt; &lt;br /&gt;
    &amp;lt;Message Importance="high" Text="In target PreBuild"/&amp;gt; &lt;br /&gt;
    &amp;lt;!-- Clean the output directories--&amp;gt; &lt;br /&gt;
    &amp;lt;CallTarget Targets="CleanDirectories"/&amp;gt; &lt;br /&gt;
    &amp;lt;!--Set assembly versions equal to CCNet version--&amp;gt; &lt;br /&gt;
    &amp;lt;CallTarget Targets="SetAssemblyVersions"/&amp;gt; &lt;br /&gt;
  &amp;lt;/Target&amp;gt; &lt;br /&gt;
  &amp;lt;!-- Build projects --&amp;gt; &lt;br /&gt;
  &amp;lt;Target Name="Build" DependsOnTargets="PreBuild"&amp;gt; &lt;br /&gt;
    &amp;lt;Message Importance="high" Text="In target Build"/&amp;gt; &lt;br /&gt;
    &amp;lt;MSBuild Projects="$(ProjectFile)"&amp;gt; &lt;br /&gt;
    &amp;lt;/MSBuild&amp;gt; &lt;br /&gt;
    &amp;lt;MSBuild Projects="$(TestProjectFile)"&amp;gt; &lt;br /&gt;
    &amp;lt;/MSBuild&amp;gt; &lt;br /&gt;
  &amp;lt;/Target&amp;gt; &lt;br /&gt;
  &amp;lt;ItemGroup&amp;gt; &lt;br /&gt;
    &amp;lt;ProjectOutput Include="$(ProjectDir)\$(OutputDir)\*.*"/&amp;gt; &lt;br /&gt;
  &amp;lt;/ItemGroup&amp;gt; &lt;br /&gt;
  &amp;lt;ItemGroup&amp;gt; &lt;br /&gt;
    &amp;lt;ProjectTestOutput Include="$(ProjectTestDir)\$(OutputDir)\*.*"/&amp;gt; &lt;br /&gt;
  &amp;lt;/ItemGroup&amp;gt; &lt;br /&gt;
  &amp;lt;!--Cleanup tasks after build--&amp;gt; &lt;br /&gt;
  &amp;lt;Target Name="PostBuild" DependsOnTargets="Build"&amp;gt; &lt;br /&gt;
    &amp;lt;Message Importance="high" Text="In target PostBuild"/&amp;gt; &lt;br /&gt;
    &amp;lt;Copy SourceFiles="@(ProjectOutput)" DestinationFolder="C:\buildOutput\ProjectX\$(Version)"/&amp;gt; &lt;br /&gt;
    &amp;lt;Copy SourceFiles="@(ProjectTestOutput)" DestinationFolder="C:\buildOutput\ProjectX\Test\$(Version)"/&amp;gt; &lt;br /&gt;
  &amp;lt;/Target&amp;gt; &lt;br /&gt;
  &amp;lt;!-- Run all tests with the Continuous category--&amp;gt; &lt;br /&gt;
  &amp;lt;Target Name="UnitTestContinuous"&amp;gt; &lt;br /&gt;
    &amp;lt;Message Importance="high" Text="In target UnitTestContinuous"/&amp;gt; &lt;br /&gt;
    &amp;lt;CreateItem Include="SmartRename.Test.Dummy.dll"&amp;gt; &lt;br /&gt;
      &amp;lt;Output TaskParameter="Include" ItemName="TestAssembly" /&amp;gt; &lt;br /&gt;
    &amp;lt;/CreateItem&amp;gt; &lt;br /&gt;
    &amp;lt;Message Importance="high" Text="Assemblies: @(TestAssembly)"/&amp;gt; &lt;br /&gt;
    &amp;lt;NUnit ToolPath="C:\Program Files\NUnit 2.4.6\bin" WorkingDirectory="$(ProjectTestDir)\$(OutputDir)" Assemblies="@(TestAssembly)" ExcludeCategory="$(ExcludeTestCategories)" OutputXmlFile="$(NUnitOutputXmlFile)"/&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 9pt;"&gt;  &amp;lt;/Target&amp;gt; &lt;br /&gt;
  &amp;lt;!-- Package a&amp;amp; deployment tasks--&amp;gt; &lt;br /&gt;
  &amp;lt;Target Name="Package" DependsOnTargets="Build"&amp;gt; &lt;br /&gt;
    &amp;lt;Message Importance="high" Text="In target Package"/&amp;gt; &lt;br /&gt;
  &amp;lt;/Target&amp;gt; &lt;br /&gt;
&amp;lt;/Project&amp;gt;  &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;  &lt;/p&gt;
&lt;p&gt;(note some of the targets are placeholders). &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;span style="font-family: Arial; font-size: 10pt;"&gt;This is more involved and MSBuild is well documented, but the key things to note are:&lt;/span&gt; 		&lt;span style="font-family: Arial; font-size: 10pt;"&gt; 		&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;Properties defined in the initial PropertyGroup can be overridden by values passed to the MSBuild exe (with /p:name=value;name2=value2); they are referenced in the script with $(name); &lt;/span&gt; 		&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;ItemGroup allows you to define an array of items that can be operated on (e.g. in CleanDirectories target); the loop is started and entries accessed with %(GroupName.ElementName); &lt;/span&gt; 		&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;Individual items in an ItemGroup can be accessed with @(ItemName); &lt;/span&gt;&lt;br /&gt;
    &lt;span style="font-family: Arial; font-size: 10pt;"&gt;DependsOnTargets flag will ensure the necessary targets are run before the executing target, but will not invoke the target if it has already been called; &lt;/span&gt; 		&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-family: Arial; font-size: 10pt;"&gt;The SetAssemblyVersions target uses a MSBuild Community Task (&lt;a href="http://msbuildtasks.tigris.org/"&gt;http://msbuildtasks.tigris.org/&lt;/a&gt;) to update the build number in the projects' AssemblyInfo files - this ensures the built assemblies have the same build number as the Perforce source label (available in $(CCNetLabel) property.&lt;/span&gt; 		&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122473"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122473" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/122473.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2008/05/29/sample-cruisecontrol-build-using-perforce.aspx</guid>
            <pubDate>Thu, 29 May 2008 19:34:17 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/122473.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2008/05/29/sample-cruisecontrol-build-using-perforce.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/122473.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Using Perforce with CruiseControl.Net</title>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2008/04/04/using-perforce-with-cruisecontrol.net.aspx</link>
            <description>&lt;br /&gt;
On my latest project we're using Perforce for source control and my first tasks have been to set up CruiseControl.Net for continuous integration, and define the branching strategy to use. I'm new to P4 and wanted to document the learning curve - the next few posts will cover what I've put in place.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;Perforce Concepts&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;Being an SCM with all the usual features, Perforce naturally has a different set of terminology for all the usual concepts. The repository on the server is the &lt;span style="font-weight: bold;"&gt;depot &lt;/span&gt;and the local dev repository is a &lt;span style="font-weight: bold;"&gt;workspace&lt;/span&gt;. The workspace is also known as a &lt;span style="font-weight: bold;"&gt;client view&lt;/span&gt;, which has a mapping to the depot that looks like: &lt;br /&gt;
&lt;br /&gt;
    &lt;span style="font-family: Courier New;"&gt;//depot/ProjectX/... //a.developer/ProjectX/...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
- meaning all files within the ProjectX node of the depot are mapped to the ProjectX node of a.developer's workspace.&lt;br /&gt;
&lt;br /&gt;
Views are also used in branching and labelling, which I'll cover more in the branch strategy post.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-style: italic;"&gt;CruiseControl Config&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Perforce with CC is a well trodden path, but for reference the sourceControl project node is:
&lt;p style="font-family: Courier New;"&gt;    &amp;lt;sourcecontrol type="p4"&amp;gt;&lt;br /&gt;
        &amp;lt;view&amp;gt;//depot/ProjectX/MAIN/source/...&amp;lt;/view&amp;gt;&lt;br /&gt;
        &amp;lt;client&amp;gt;BuildServer&amp;lt;/client&amp;gt;&lt;br /&gt;
        &amp;lt;applyLabel&amp;gt;true&amp;lt;/applyLabel&amp;gt;&lt;br /&gt;
        &amp;lt;autoGetSource&amp;gt;true&amp;lt;/autoGetSource&amp;gt;&lt;br /&gt;
    &amp;lt;/sourcecontrol&amp;gt;&lt;/p&gt;
The client node specifies the workspace to connect to, and the view specifies the exact mapping for the project. That view is used to monitor the folder for changes, and if you specify autoGetSource and applyLabel, they'll run over all the files in the view. This allows you to set up one workspace for the build server which has a view over the entire depot, and then specify different views for each build project. &lt;br /&gt;
&lt;br /&gt;
There are various warnings saying that Perforce doesn't work with purely numeric labels, but in version 2007.3 that seems fine. With the standard iteration labeller for every successful build CC will create a label in Perforce and label every file in the specified view.&lt;br /&gt;
&lt;br /&gt;
Perforce seems like a nice SCM, with excellent cross-platform support. The licensing model allows you to download and use it for free with up to 2 users and 5 workspaces: &lt;a href="http://www.perforce.com/perforce/loadprog.html"&gt;http://www.perforce.com/perforce/loadprog.html&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=121035"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=121035" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/121035.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2008/04/04/using-perforce-with-cruisecontrol.net.aspx</guid>
            <pubDate>Fri, 04 Apr 2008 13:31:44 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/121035.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2008/04/04/using-perforce-with-cruisecontrol.net.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/121035.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>