views:

51

answers:

2

I have CruiseControl.NET configured to monitor 10+ .NET projects. All of these projects (web apps, windows services, wcf services, etc...) use shared class library projects so in the ccnet.config I had to set the svn path for each project to the root of the svn repo. If I didn't do it this way then a change to a shared assembly wouldn't trigger projects that depend on it to rebuild.

The issue is that because I've set the svn path for each project to the root of the repo then that means that any change at all triggers a rebuild of every single project, which takes a really long time. How do you get around this issue with using shared assemblies in multiple projects without having every single project rebuild every time a little change is made??

Here's another way to see the issue:

CC Project #1 = svn://repo/WebApps/WebsiteA (references svn://repo/Shared/ClassLibraryA) CC Project #2 = svn://repo/WebApps/WebsiteB (references svn://repo/Shared/ClassLibraryB)

For CC Project #1, you can't set the svn path to svn://repo/WebApps/WebSiteA, as if you did and ClassLibraryA changed then it wouldn't trigger a build. However if you set the path to svn://repo, then it'll pick up the changes to the ClassLibraryA, but then it'd also trigger CC Project #2.

Any suggestions would be greatly appreciated...

+1  A: 

The answer was to use the sourcecontrol multi block in CruiseControl.NET, which allows you to specify multiple svn paths for each project:

http://ccnet.sourceforge.net/CCNET/Multi%20Source%20Control%20Block.html

Justin
+1  A: 

You may want to use the Project Trigger to start a build : http://confluence.public.thoughtworks.org/display/CCNET/Project+Trigger

If your ClassLibraryA has a project on CruiseControl (whose svnpath is svn://repo/Shared/ClassLibraryA) then your WebsiteA would look like :

<project name="WebSiteA">
    <triggers>
        <projectTrigger project="ClassLibraryA">
          <triggerStatus>Success</triggerStatus>
          <innerTrigger name="ClassLibraryA" type="intervalTrigger" seconds="60" buildCondition="ForceBuild" />
        </projectTrigger>
        <intervalTrigger seconds="300"/>
    </triggers>
    <cb:svn-block svnpath="repo/WebApps/WebsiteA" />
    <tasks>
        <...>
    </tasks>
    <publishers>
        <...>
    </publishers>
</project>
Benjamin Baumann
Thanks, that solution would certainly work. The only issue I have with it is you have to create a cc project for each shared class library, when personally I prefer each cc project to be a solution for something like a web app, a windows service, a wcf service, etc...
Justin
I think that's the "cleaner" solution. Alternatively you can use a filtered source control block (http://ccnetlive.thoughtworks.com/ccnet/doc/CCNET/Filtered%20Source%20Control%20Block.html ) but it's more difficult to maintain.
Benjamin Baumann