views:

702

answers:

2

I have a multiple platform application set, with some applications running on Linux and some on Windows. I want to accomplish the following build:

Server L runs CruiseControl with Project A, a Linux-only server application. This should build first.

If Project A builds successfully, it needs to somehow kick off...

Project B, a Windows-only client application running on Server W, with CruiseControl.NET Project B includes some Unit tests that have the end effect of generating some data in the server database. Project B takes about 10 minutes to build and execute the tests.

If Project B builds successfully, Server L, which has been waiting patiently, kicks off Project C, which contains some test cases that look for and validate the database entries that were generated by Project B.

Any ideas on how I can get this done? I found this link, but it seems to be aimed at building the same code base on multiple platforms without dependencies.

Surely, someone must have done this at some point?

+2  A: 

Having Project A build is straight forward. In the publishing phase write a file to a network drive.

Project B can use the files system source control block to monitor the network file system, and trigger a build based on the change from Project A. When it is done it writes another file to the file system (different dir).

Project C is using the file system source control to watch for changes from Project B.

All pretty simple.

If you don't have a shared file system you can also use ftp, scp, or http to move trigger files around.

If you prefer you can trigger a build using the web interfaces, called from the Project A and Project B publishing phases.


Wrt the questions in the comments, you can get information on Project B failing (at least) two different ways.

One would be to have a Project B under CC that served as a proxy for the remote Project B. The remote Project B would write a file during the publishing phase and in the file indicate if it passed or failed. The proxy-B project would monitor that file and during its "build" phase would read the file and pass or fail based on the contents. Project C now just monitors proxy-B using CC's BuildStatus element.

Another way to approach the problem would be to replace Project B under CC.net with CC's DistributedBuilder which uses JavaSpaces to distribute builds to remote agents: http://confluence.public.thoughtworks.org/display/CC/Using+distrib+from+the+CruiseControl+contrib

In the distributed approach Project B would still be run on the windows machine but the DistributedBuilder would run the script remotely and then bring the results back to the CC server.

Jeffrey Fredrick
Interesting... but is there a way to communicate a build failure? If Project B fails, I'd like to communicate the failure back as well.
Kevin P.
Kevin, since each of these builds is a seperate project configuration. B will report its own failures as would C.
Alex
Added info to my answer about how to get status of Project B back to the CC machine.
Jeffrey Fredrick
A: 

Are you mixing CruiseControl and CruiseControl.Net? For CruiseControl.Net-only setup, just use Project Trigger.

skolima