Hi(I can't find the original, so if this is a dupe, apologies),
I have cc.net installed and running, with a svn repository.  I have
the following issue, and I haven't found any documentation on how to
resolve it.  Currently in svn we have several projects, and some
shared libraries.  I would like cc.net to kick off a build for each
project only when a user checks in code for that specific project.
For example:  some code for ProjA gets checked in so I would run the
Nant/Mbunit scripts for ProjA & the Library only, not ProjB.

I have the following svn layout:
svn://server:3690//trunk/Application/ProjA/<source & project file>
svn://server:3690//trunk/Application/ProjB/<source & project file>
svn://server:3690//trunk/Application/ProjC/<source & project file>
svn://server:3690//trunk/Application/Library/<source & project file>
svn://server:3690//trunk/Website/Web/<source & project file>


My ccnet.config looks like the following:
        <project name="ProjA" >
        <workingDirectory>C:\dir</workingDirectory>

        <sourcecontrol type="svn">
                <executable>C:\dir\to\svn.exe</executable>
                <trunkUrl>svn://server:3690</trunkUrl>
                <workingDirectory>c:\workingDir</workingDirectory>
                <autoGetSource>true</autoGetSource>
                <username>uname</username>
                <password>pwd</password>
        </sourcecontrol>
        <labeller type="svnRevisionLabeller">
                <major>1</major>
                <minor>0</minor>
                <url>svn://server:3690</url>
                <username>uname</username>
                <password>pwd</password>
        </labeller>

        <tasks>
                <nant>
                        <executable>C:\Program 
Files\Nant\bin\nant.exe</executable>
                        <baseDirectory>C:\dir</baseDirectory>
                        <buildArgs></buildArgs>
                        <nologo>false</nologo>
                        
<buildFile>C:\NantScripts\ProjA_Application.build</buildFile>
                        <logger>NAnt.Core.XmlLogger</logger>
                        <targetList>
                                <target>Build_ProjA</target>
                        </targetList>
                        <buildTimeoutSeconds>1200</buildTimeoutSeconds>
                </nant>
        </tasks>

        .... publishers, some other unrelated stuff

        </project>

A couple of "use case" scenarios would be:
A developer checks in code for ProjA and ccnet would call the Nant
script to build ProjA(ProjA_Application.build above).
A developer checks in code for ProjB and ccent would call the Nant
script to build ProjB(not in example above, but similiar to ProjA).
A developer checks in changes to the Library and we would build all
the projects that use the Library(ProjA, ProjB, ProjC, and the Web).

I tried changing the tags to the following:
                <trunkUrl>svn://server:3690/trunk/Application/ProjA</trunkUrl>
                
<workingDirectory>c:\dir\trunk\Application\ProjA</workingDirectory>
to narrow down when to check for changes, but this didn't seem to
work.

I use NAnt to do the builds, and Mbunit for the testing, I need a
little help being able to call the right script based on certain
changes in the repository.  Currently if ProjA changes everything
rebuilds, even if there is no impact(ProjA, ProjB, ProjC, and Web
don't interact).

Reply via email to