Elton Stoneman

  Home  |   Contact  |   Syndication    |   Login
  85 Posts | 0 Stories | 360 Comments | 0 Trackbacks

News

Archives

Post Categories


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.

Perforce Concepts

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 depot and the local dev repository is a workspace. The workspace is also known as a client view, which has a mapping to the depot that looks like:

    //depot/ProjectX/... //a.developer/ProjectX/...

- meaning all files within the ProjectX node of the depot are mapped to the ProjectX node of a.developer's workspace.

Views are also used in branching and labelling, which I'll cover more in the branch strategy post.

CruiseControl Config

Perforce with CC is a well trodden path, but for reference the sourceControl project node is:

    <sourcecontrol type="p4">
        <view>//depot/ProjectX/MAIN/source/...</view>
        <client>BuildServer</client>
        <applyLabel>true</applyLabel>
        <autoGetSource>true</autoGetSource>
    </sourcecontrol>

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.

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.

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: http://www.perforce.com/perforce/loadprog.html
posted on Friday, April 04, 2008 8:31 AM

Feedback

# re: Using Perforce with CruiseControl.Net 5/29/2008 12:55 PM Tim
I too have recently been put on a project where P4 is the source control tool in place. The first task that I would like to complete is a continous integregation build process. I am really interested in reading more of your implementation notes. If you have any information that you are willing to share I would greatly appreciate it.
timothy_adams_gilbert@yahoo.com

# re: Using Perforce with CruiseControl.Net 5/29/2008 2:37 PM Elton
No problem Tim - I've put up a more detailed post here: http://geekswithblogs.net/EltonStoneman/archive/2008/05/29/sample-cruisecontrol-build-using-perforce.aspx

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: