First put both projects in the same queue.  Your BrowserTest project doesn't
specify a queue.
You then have two options:
1. Use a ProjectTrigger in the BrowserTest project to monitor the
TestProject.
2. Alternatively use a ForceBuildPublisher in the publishers section of the
TestProject to force a build of the BrowserTest.

I use the first approach to chain projects in our build pipeline.

Details on using these can be found as usual at
http://confluence.public.thoughtworks.org/display/CCNET/Configuring+the+Serv
er 

Kind regards,

Tim

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of sam
Sent: 05 February 2009 09:36
To: ccnet-user
Subject: [ccnet-user] Re: How to execute multiple projects in sequence


Following is my config file. I want to run MyITRTestProject first and
then when build is completed it should start MyITRBrowserTest project.

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
  <project name="MyITRTestProject" queue="Q1" queuePriority="1">
    <sourcecontrol type ="svn">
      <trunkUrl>svn://rom/me/TestReports/</trunkUrl>
      <workingDirectory>C:\source\TestProjects\ITRTests
\MyITRTestProject\</workingDirectory>
      <executable>c:\program files\subversion\bin\svn.exe</
executable>
    </sourcecontrol>


    <!--<triggers>
      <scheduleTrigger time="13:35" buildCondition="ForceBuild"
name="Scheduled"/>
    </triggers>-->


      <triggers>
        <intervalTrigger name="continuous" seconds="60"/>
        <scheduleTrigger time="13:35" buildCondition="ForceBuild"
name="Scheduled"/>
      </triggers>


    <!--<triggers>
      <scheduleTrigger time="12:05" buildCondition="ForceBuild"
name="Scheduled">
        <weekDays>
          <weekDay>Thursday</weekDay>
        </weekDays>
      </scheduleTrigger>
    </triggers>-->


    <tasks>
      <!-- Use MsBuild to build the .Net solution-->
      <msbuild>
        <executable>C:\WINDOWS\Microsoft.NET\Framework
\v3.5\MSBuild.exe</executable>
        <workingDirectory>
          C:\source\TestProjects\ITRTests\MyITRTestProject\
        </workingDirectory>
        <projectFile>MyITRTestProject.sln</projectFile>
        <buildArgs>/noconsolelogger /p:Configuration=Debug /v:diag</
buildArgs>
        <targets>Build</targets>
        <timeout>9600</timeout>
        <logger>C:\Program Files\CruiseControl.NET\server
\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
      </msbuild>


      <!-- Use NUnit for unit testing-->
      <nunit path="C:\Program Files\NUnit 2.4.8\bin\nunit-
console.exe"
timeout="6000">
        <assemblies>
          <!--Path to Visual Studio project executable-->
          <assembly>
            C:\source\TestProjects\ITRTests\MyITRTestProject
\MyITRTestProject\bin\Debug\MyITRTestProject.dll
          </assembly>
        </assemblies>
      </nunit>
    </tasks>
  </project>

  <project name="MyITRBrowserTest">
    <sourcecontrol type ="svn">
      <trunkUrl>svn://rom/me/TestReports/</trunkUrl>
      <workingDirectory>C:\source\TestProjects\ITRTests
\MyITRBrowserTest\</workingDirectory>
      <executable>c:\program files\subversion\bin\svn.exe</
executable>
    </sourcecontrol>


    <triggers>
      <intervalTrigger name="continuous" seconds="60"/>
      <scheduleTrigger time="15:00" buildCondition="ForceBuild"
name="Scheduled"/>
    </triggers>


    <tasks>
      <!-- Use MsBuild to build the .Net solution-->
      <msbuild>
        <executable>C:\WINDOWS\Microsoft.NET\Framework
\v3.5\MSBuild.exe</executable>
        <workingDirectory>
          C:\source\TestProjects\ITRTests\MyITRBrowserTest\
        </workingDirectory>
        <projectFile>MyITRBrowserTest.sln</projectFile>
        <buildArgs>/noconsolelogger /p:Configuration=Debug /v:diag</
buildArgs>
        <targets>Build</targets>
        <timeout>9600</timeout>
        <logger>C:\Program Files\CruiseControl.NET\server
\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
      </msbuild>


      <!-- Use NUnit for unit testing-->
      <nunit path="C:\Program Files\NUnit 2.4.8\bin\nunit-
console.exe"
timeout="6000">
        <assemblies>
          <!--Path to Visual Studio project executable-->
          <assembly>
            C:\source\TestProjects\ITRTests\MyITRBrowserTest
\MyITRBrowserTest\bin\Debug\MyITRBrowserTest.dll
          </assembly>
        </assemblies>
      </nunit>
    </tasks>

 </project>
</cruisecontrol>

Kind Regards
Sam

Reply via email to