views:

348

answers:

4

I am new to cruise control.net please help me with the following scenario

I need to force the other projects from one project. I know in the publisher part with the force build we can force the other projects. But my requirement is I want to force more than 2 projects but those projects should start one after the other this also can be solved by giving the queuePriority for the projects. Here we are having one limitation I want to force the builds individually also at that time it should not check for the queue.

Example If I am forcing from BuildAll project it should build project A, Project B(after project A completion) & Project C( after completing project A & Project B)

If I am forcing Project A it should start, at same time if I am forcing Project B & Project C those also should build with out checking the project A completion.

Thanks in advance

A: 

Same thing i am searching if u got a solution for same .

please update me on my mailid [email protected]

sachin
Rather than ask for him to update you, shouldn't you just keep an eye on this post?
Brett Rigby
A: 

In project B, you could add a filesystem source control element, pointing at Project A's output directory, set to trigger on modifications.

This would have a side effect that there's no way to build project A without it triggering project B to build also.

Damien_The_Unbeliever
A: 

NO i want to trigger the builds individually also. Is there a way can we have the multiple configuration file in ccnet. From the same server.

surya
please edit your question with this extra information rather than posting an 'answer'
Pondidum
+1  A: 

In my opinion the better solution is to use some build script like NAnt or MSBuild. Then your CruiseControl .NET just executes a part of build-script. Usually build-scripts are easier to maintain than a ccnet.config.

Also the debugging is easier as you can run any part of the build-script manually.

Example in MsBuild: You can first make a xml-file (let's call it MyTasks.msbuild):

<Project DefaultTargets="All" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
  <Target Name="ProjectA">
    <!-- Your project build-scripting...-->
    <Exec Command="echo Hello A"/>
  </Target>
  <Target Name="ProjectB">
    <!-- Your project build-scripting...-->
    <Exec Command="echo Hello B"/>
  </Target>
  <Target Name="All">
    <CallTarget Targets="ProjectA" />
    <CallTarget Targets="ProjectB" />
  </Target>
</Project>

If you like to use it from command-line, just type "msbuild MyTasks.msbuild" Then in ccnet.config:

  <project name="ProjectA" >
    <!-- ... -->
    <tasks>
      <msbuild>
        <executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.21006\MSBuild.exe</executable>
        <timeout>3600</timeout>
        <logger>C:\Program Files\CruiseControl\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
        <workingDirectory>C:\Temp\CI\</workingDirectory>
        <projectFile>C:\MyTasks.msbuild</projectFile>
        <buildArgs>/toolsversion:4.0 /p:Configuration=Debug;</buildArgs>
        <targets>ProjectA</targets>
        <description>Building Project A</description>
      </msbuild>
    </tasks>
    <!-- ... -->
  </project>
  <project name="All" >
    <!-- ... -->
    <tasks>
      <msbuild>
        <executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.21006\MSBuild.exe</executable>
        <timeout>3600</timeout>
        <logger>C:\Program Files\CruiseControl\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
        <workingDirectory>C:\Temp\CI\</workingDirectory>
        <projectFile>C:\MyTasks.msbuild</projectFile>
        <buildArgs>/toolsversion:4.0 /p:Configuration=Debug;</buildArgs>
        <targets>All</targets>
        <description>Building Project A and B</description>
      </msbuild>
    </tasks>
    <!-- ... -->
  </project>

The only bad thing is that if your build would take like 20min, you don't know the status in cc. But that can be fixed as your project name="All" could have many msbuild tasks:

  <project name="All" >
    <!-- ... -->
    <tasks>
      <msbuild>
       <!-- ... -->
        <targets>ProjectA</targets>
      </msbuild>
      <msbuild>
       <!-- ... -->
        <targets>ProjectB</targets>
      </msbuild>
    </tasks>
    <!-- ... -->
  </project>

Hope this helps...

Tuomas Hietanen