views:

425

answers:

2

Hello,

I need to configure my project in cruise-control so that when it gets the source code from SourceSafe, it also gets the code for another project from SourceSafe. Is this possible?

I need this because I am trying to configure cruise control to build a solution which contains multiple projects from different SourceSafe locations. I can only specify one project to 'get' from sourcesafe and so I am getting an msbuild failure when cruisecontrol builds the solution.

Cheers

SciFi

+3  A: 

You need to use the tag in CruiseControl.

I'm not using SSafe, but here's an example of me pulling multiple projects from Seapine's Surround:

<sourcecontrol type="multi">
            <sourceControls>
                <surround>
                    <executable>d:\program Files\Seapine\Surround SCM\sscm.exe</executable>
                    <serverlogin>user:pw</serverlogin>
                    <branch>WindowsApps</branch>
                    <repository>WindowsApps/Project1</repository>
                    <workingDirectory>d:\AutomatedBuilds\Project1</workingDirectory>
                    <recursive>1</recursive>
                </surround>
                <surround>
                    <executable>d:\program Files\Seapine\Surround SCM\sscm.exe</executable>
                    <serverconnect>10.1.1.42:4900</serverconnect>
                    <serverlogin> >user:pw </serverlogin>
                    <branch>WindowsApps</branch>
                    <repository>WindowsApps/Project2</repository>
                    <workingDirectory>d:\AUtomatedBuilds\Project2</workingDirectory>
                    <recursive>1</recursive>
                </surround>
                <surround>
                    <executable>d:\program Files\Seapine\Surround SCM\sscm.exe</executable>
                    <serverconnect>10.1.1.42:4900</serverconnect>
                    <serverlogin> >user:pw </serverlogin>
                    <branch>WindowsApps</branch>
                    <repository>WindowsApps/Project3</repository>
                    <workingDirectory>d:\AutomatedBuilds\Project3</workingDirectory>
                    <recursive>1</recursive>
                </surround>
taylonr
That would work, but the visual studio solution looks for Project-B in the location "../../../Project-B/". Because of the relative path, the project would end up in a location outside of my desired CruiseControl build directory. Any way around this?
SciFi
The "WorkingDirectory" block is where yould specify your CC Build directory.Unless there's some reason the WorkingDirectory doesn't work in SSafe w/CCNet
taylonr
Actually that's not what I mean. No matter where I tell CruiseControl to put the project, msbuild will always expect it to be in the wrong location because it is specified in the .sln file. I guess this isn't really a cruise control issue but I'm wondering about the best way to handle this. Maybe my automated builds folder structure should reflect my sourcesafe structure exactly?
SciFi
OIC. Not sure about the structure. Certainly that would be one option.
taylonr
In fact replicating my sourcesafe structure won't work because the cruisecontrol folder structure prevents me from doing so. For example in sourcesafe $/Project-A and $/Project-B are located in the same root. In cruise control they are located as such: "D:\Build\Projects\Project-A\WorkingDirectory" and "D:\Build\Pojects\Project-B\WorkingDirectory"
SciFi
I'm not sure you want to mimic your SSAfe structure, as much as you want to mimic your SLN structure.
taylonr
Indeed, I am in the process of restructuring my cruisecontrol box so that the structure is the same as the solution structure would be. It just so happens that this is also the SourceSafe structure we use. Cheers.
SciFi
A: 

We're facing exactly the same problem.

As taylonr pointed out it is possible to monitor multiple subtrees from source control. But you need to put the information on the repository locations in source control into CCNET configuration.

You might parse the solution file, extract the file paths, and generate the configuration file. But even then you would encounter new problems:

  1. If the solution file contains relative paths, you would need to transform these into absolute paths.
  2. The path information in the solution file references local directories and files. You would need to map this back to the repository structure in source control.

For this very reason we decided to drop solution support. Each CCNET project refers to a VS project. Each file inside a VS project needs to be put inside the project's directory/repository subtree. This tree can easily be monitored by CCNET then.

The Chairman