R – How to configure CruiseControl.net to build co-dependent projects

cruisecontrol.net

For Instance:

I want to build Project A. Project A Depends on Project B and Project C.

Edit:
Each project has its own trunk in SVN:
[repository]/ProjectA/trunk
[repository]/ProjectB/trunk
[repository]/ProjectC/trunk

My question has a couple of parts:

  1. What is the approach/configuration for CCNET to achieve this "dependent" build?
  2. How should I configure the projects so that Project B or C is built, then it triggers a build of Project A?
  3. As each project gains dependencies, what is the scalable approach/configuration to scale the build process?

I'm a newbie to CCNET so if there are some underlying concepts please don't assume I am aware of them. Details are my friend 😀

Edit:
I'm using SVN as my source control provider.

Best Answer

You can use a Project Trigger to start ProjectA when ProjectB is successfully built, like this:

<project name="ProjectA">
    <triggers>
        <projectTrigger project="ProjectB">
            <triggerStatus>Success</triggerStatus>
            <innerTrigger type="intervalTrigger"
                          seconds="60"
                          buildCondition="ForceBuild" />
        </projectTrigger>
    </triggers>
    ...
</project>

This polls the build result for ProjectB every 60 seconds, and if there is a new successful build then ProjectA is triggered. By default it will look for the project on the same CCNET server, but you can point it at another one with the serverUri attribute. You can add another trigger for ProjectA if you also want it to build when its Subversion repository is updated.

If you're running the builds on the same server you can put them in the same queue if they might interfere with each other in any way, otherwise you could have them both building at the same time.

Related Topic