开发者

CruiseControl.NET issue when multiple projects use shared projects

开发者 https://www.devze.com 2023-01-11 02:29 出处:网络
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 ha

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开发者_如何学Python 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...


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>


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

0

精彩评论

暂无评论...
验证码 换一张
取 消