Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure CruiseControl.net to build co-dependent projects?

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 :-D

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

like image 518
Achilles Avatar asked Nov 05 '09 20:11

Achilles


People also ask

How do I configure the CruiseControl server to support continuous integration?

Outside of writing your build scripts to support Continuous Integration, your main configuration task in getting an instance of CruiseControl.NET running for your project is editting the Server's configuration file. This is defined in an XML file which by default is called ccnet.config in the same directory as the server application.

What is CruiseControl net?

Welcome to CruiseControl.NET, an Automated Continuous Integration server, implemented using the .NET Framework. CruiseControl.NET Wiki – Documentation, Downloads, Support, … About CruiseControl.NET – What is CruiseControl.NET? Hosting infrastructure sponsored by Nauck IT KG. Read more

What happens if I log off my CruiseControl server?

If you logoff this user the CruiseControl.NET server will shut down and you won't get any builds. In order for Test Studio and Telerik Testing Framework tests that interact directly with the desktop to work you'll need to leave your CruiseControl.NET machine logged on and displaying the desktop all the time.

What are the modes in which CruiseControl can be run?

CruiseControl.NET can be run in two modes: There is a problem with using Windows service mode. Test Studio tests and Telerik Testing Framework tests require the browser be able to run and interact with the desktop. When running builds and tests under a Windows service, desktop interaction is disabled.


1 Answers

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.

like image 75
GraemeF Avatar answered Sep 30 '22 16:09

GraemeF