views:

2272

answers:

6

Hi Im using Cruise Control .Net 1.4 for Continuous integration and have installed it on my Windows 2000 desktop. I have Nant 0.85 for the Build. My Source control is in Borland Starteam 2005. I have .Net 2003 framework installed which i use for creating VB.Net windows applications. I have installed CCnet and I think my Ccnet.config file is configured correctly. The problem that i face is that whenever I change any code and check in starteam, the modifications are not getting detected by CCnet server and so I cannot trigger my builds on the basis of modifications. I have to rely on forcebuild for that. But using forcebuild at after every 1 minute is not acceptable for my project. I want the trigger to be based on modification. I.e. as soon as a change is detected on Starteam, the build should automatically take place.

My CCNet.config file is this -

<workingDirectory>C:\Documents and Settings\uj0011637\Desktop\StarteamCruiseControl\CCNet17Nov08</workingDirectory>
<webURL>http://172.24.120.37/ccnet&lt;/webURL&gt;

<triggers>
 <intervalTrigger name="continuous" seconds="120" buildCondition="ForceBuild" initialSeconds="120"/>         
    </triggers>


<sourcecontrol type="starteam">
   <executable>C:\Program Files\Borland\StarTeam Cross-Platform Client 2005 R2\stcmd.exe</executable>
   <project>DEL_CA_ROBOTS\Tools\CCNet17Nov08</project>
   <username>600513221</username>
   <password>car0b0ts</password>
   <host>oscar.nat.bt.com</host>
   <port>51234</port>
   <autoGetSource>true</autoGetSource>
   <timeout units="minutes">10</timeout>
</sourcecontrol>


<tasks>
      <!-- Configure NAnt to compile the updated files -->c:\
    <nant>
 <executable>C:\Documents and Settings\uj0011637\Desktop\Cruise Control\nant\nant-0.85\bin\NAnt.exe</executable>
 <baseDirectory>C:\Documents and Settings\uj0011637\Desktop\StarteamCruiseControl\CCNet17Nov08</baseDirectory>
 <nologo>false</nologo>
 <buildFile>CCNet17Nov08.build</buildFile>
 <logger>NAnt.Core.XmlLogger</logger>
   <buildTimeoutSeconds>1200</buildTimeoutSeconds>
    </nant>
</tasks>


<!--Publishers will be done after the build has completed-->
 <publishers>
  <xmllogger>
    <logDir>C:\Documents and Settings\uj0011637\Desktop\StarteamCruiseControl\Log</logDir>
  </xmllogger>
 </publishers>

 <modificationDelaySeconds>10</modificationDelaySeconds>

And my build file is this -

<target name="clean" description="Delete all previously compiled binaries.">
    <delete>
        <fileset>
            <include name="**/bin/${project::get-name()}.dll" />
            <include name="**/obj/**" />
            <include name="**/*.user" />
        </fileset>
    </delete>
</target>
<target name="rebuild" dependsontarget="clean, build ">
<zip zipfile="${project::get-name()}.zip"  verbose="true">
    <fileset>
 <include name="**/bin/*.dll" />
 <include name="**/bin/*.exe" />
    </fileset>
    <fileset>
 <include name="*.aspx" />
 <include name="*.css" />
 <include name="*.config" />
 <include name="*.js" />
 <include name="*.asax" />
 <include name="**.txt" />
 <include name="**.vb" />
 <include name="**.vbproj" />
 <include name="**.user" />
 <include name="**.sln" />
 <include name="**.suo" />
 <include name="**.resx" />

    </fileset>
    <fileset prefix="SQL">
 <include name="*.sql" />
    </fileset>
</zip>



</target>

<target name="unit_test" description="Run unit tests.">

     <exec program="${nunit.dir}\nunit-console.exe" commandline="bin/${prjname}.exe /xml=${prjname}.xml /nologo" />

   </target>

    <target name="build.Console">

    <solution configuration="release" solutionfile="CCNet17Nov08.sln">

    </solution>

    <property name="expected.output" value="bin/${prjname}.exe"/>
    <fail unless="${file::exists(expected.output)}">Output file doesn't exist in ${expected.output}</fail>

</target>

Can anybody please guide me with this?? This problem is getting on my nerves now since a week and i need to get it resolved by tomorrow.. Please help!!!

A: 

I had challenges in understanding the documentation for installing and configuring CruiseControl.Net with StarTeam as the souce control in a Vista system running IIS 7. Finally I have successfully set up cruise control to work. I am listing the steps to get it working.

Step 1:Grab a copy of CruiseControl.Net from here. Run the setup. As a part of the install, the setup installs the ccnet server and a webdashboard.

Step 2:Once installed, to get the webdashboard up and running, fire your browser and type. http://localhost/ccnet (this is the default virtual directory on install. This points to the $InstallFolder/webdashboard folder in your build server. If the system is running IIS5 or 6, then you will see a CruiseControl.Net page, in IIS7, an 500 error is thrown. To resolve this issue, proceed to Step 3, if no issue was encountered, proceed to Step 4.

Step 3:Run the followin command as an administrator. Note: Here ccnet is the virtual directory which points to the physical location of webdashboard in the system.

%SystemRoot%\system32\inetsrv\appcmd migrate config "Default Web Site/ccnet"

Once the command is run, then just restart iis and browse to http://localhost/ccnet. It should show the CruiseControl.Net dashboard.

Step 4:Next step is to configure the ccnet server. Open the ccnet.config file located in the ’server’ folder of the install directory to edit.

Project Section:

Define the project section. The project name can be any identifier not necessarily your project name. This will be used by CruiseControl.Net to recognize your project.

Source Control Section

In my case, the source control was StarTeam. Various properties like login credentials, project etc, are to be set.

Executable:Path to the ’stcmd.exe’ the Star Team command line utility.

Project:The name of the Project as defined in Star Team, that has to be extracted.

UserName, Password, Host, Port:Star Team Server connection setttings.

Path:Path from which files have to extracted from StarTeam. Example: Consider the Project root folder in StarTeam is “Test”. Let the project and solution files lie in the hierarchy “Test\TestProject\MyProject”. To pull the project files and solution from this location, specify “Test” for project and “TestProject\MyProject” for path.

Override Folder Working Directory:Path to which the files from Star Team are to be checked out for the build. If not specified, the original working folder specified in the StarTeam will be used to extract the files.

Auto Get Source:Specifying this to ‘true’ will allow CruiseControl.Net to automatically check out files from StarTeam

fileHistoryRegEx:I had to make a change to the Date regular expression, as my regional settings was configured to English(India), wherein DateTime is specified as DD-MM-YYYY HH:MI:SS (IST). I had to change this, since I got a Format invalid:System.DateTime exception during the run.

TimeOut:Specify the timeout for StarTeam polling.

Following is the complete listing of the starteam configuration block. StarTeam

StarTeam

MSBuild section

I used MsBuild for the build task. Following section explains the properties involved to get the MsBuild setup for CruiseControl.Net.

Executable:Path to the ‘MsBuild.exe’ file in the system.

Working Directory:Location of the files to be built. i.e., Location to where the StarTeam extracted the files that need to be built.

Project File:The .proj file or the .sln file that needs to be built.

Build Args:Specifies additional arguments passed to the msbuild.exe.

Targets:Actions to be done. Here I wanted Clean’ and then ‘Build’ done on the Solution.

Timeout:Time after which error message will be displayed if there happens to be a failure to invoke the build.

Logger:Location of the logger assembly that will be used to produce the build result.

Following is the complete listing of the msbuild configuration block. MS Build

MS Build

Triggers Section

Triggers section specifies the time and condition when the build of the project had to be invoked. During intital setup for testing, set the buildCondition to “ForceBuild” (forces a build), and once the testing is done, change it to “IfModificationExists”(does a build only when a modification is detected).

Following is the complete listing of the Triggers configuration block. Triggers

Triggers

Step 5:Run the ccnet.exe application located in the ’server’ folder of the CruiseControl.Net install location. The code will be pulled from the StarTeam to the location specified and the build should proceed. The results of the build are stored in the $InstallFolder\ProjectName\Artifacts\ms-build.xml file.

Hope this helps.

balaweblog
A: 

Thanks for the help Bala...But my problem still persists. My problem is not with the configuration but the build. I am using NANT for building my code. The problem is that the modifications that are done on starteam are not detected by cruise control at all. Thats precisely why im unable to use the IfModificationExists option. I have to use forcebuild option to get the latest code from starteam. One more thing i found just now, the code that is pulled out from starteam, is just copied to the configured location and not compiled at all.. Had this been done, the exe file that is present in the Bin folder would have had the latest code. I hope you undersdand my query. If you could please contact me on [email protected] that would be great.. Thanks again..

A: 

I am not surprised, I've used Star Team once and I can only say that the level of crap I had to get used to in that repository tool has only been surpassed ever in my entire programming career by Source Safe...

Don't use Star Team, if I were to start a big new project today I'd probably use GIT...

Thomas Hansen
A: 

I think I have almost same problem with you.

I'm using CC with StarTeam.

I have 4 projects running on CC and only 1 project have this problem.

When I changed 1 file, CC can not detect the modification.

Here's CC log :

2008-11-26 15:26:02,188 [Q Optimizer:DEBUG] Starting process [C:\Program Files\StarTeam 4.0\stcmd.exe] in working directory [] with arguments [**hist** -nologo -x -is -filter IO -p "SPI:[email protected]:8424/Optimizer V4 & V5/Optimizer V4 & V5/Quad-Gantry" "*"]
2008-11-26 15:26:02,673 [Q Optimizer:DEBUG] Folder: Quad-Gantry  (working dir: D:\SmartPlatformV2\Optimizer)
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] History for: Axis.cpp
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] Description: 2008-09-25 JWHAN
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] 
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] Locked by: 
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] **Status: Out of Date**
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] ----------------------------
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] Revision: 5 View: Optimizer V4 & V5 Branch Revision: 1.4
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] Author: ��e�������� Date: 08/11/8 10��37��10�� ����
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] V6.953
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] 2008_11_08 ms.Kim
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] Add Height Sense, Array Fiducial, Lead Check, Bad Mark Simulation time in V6.952.
... more history contents ...
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] 
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] ----------------------------
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] Revision: 1 View: Optimizer V4 & V5 Branch Revision: 1.0
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] Author: CNA����i Date: 08/9/25 11��19��18�� ����
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] =============================================================================
2008-11-26 15:26:03,892 [Q Optimizer:DEBUG] 
2008-11-26 15:26:03,923 [Q Optimizer:DEBUG] Folder: res  (working dir: D:\SmartPlatformV2\Optimizer\res)
2008-11-26 15:26:04,048 [Q Optimizer:INFO] **No modifications detected**.

First, CC sends 'hist' command to check the modification. You can see "status : Out of date" in CC log. But, at the end of log file, "No modifications detected" wrote.

I'm still trying to find the solution. If you get any clue, please share with me. Thanks.

A: 

Try this:

  • Change project setting in config file

<project>DEL_CA_ROBOTS\Tools\CCNet17Nov08</project>

to

  <project>Project_name\View_name</project>
   <path>StarteamFolderName</path>

For example, if your project name is "DEL_CA_ROBOTS" and view name is also "DEL_CA_ROBOTS" , script should be something like ..

   <project>DEL_CA_ROBOTS\DEL_CA_ROBOTS</project>
   <path>Tools\CCNet17Nov08</path>

Hope it helps.

A: 

Hi,

have you ever tried to set the culture to en-US if possible with starteam?

I had the same problem using Visual Source Safe. The only problem was that the culture was not set correctly.

Cheers.