开发者

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.


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.


I have set up a build system of around 20 solutions and maybe a 100 projects using NAnt scripts with CCNet as a build engine. To handle dependencies between solutions I used the Java based tool Ivy.

Ivy uses binary dependencies where the dependency qualified with version information. The output of a compilation is stored in a binary repository, i.e. the file system or a even in subversion. When compiling the binary dependencies are downloaded to the file system.

This approach works fine for project where you have relatively loose coupled modules (represented by an MS Solution) which evolve relatively independently of each other. For a setup like yours where you have a separate trunk for each project/solution the projects/solutions really needs to be loosely coupled or else you will find yourself doing an awful lot of tagging and branching as the system gets larger.

If you need to have a more tight coupling between your projects I would recommend moving them to the same trunk.

Note: Ivy has to be called as an command line executable and you don't get the nice Java Ant integration.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜