开发者

CruiseControl.net build does not trigger

I feel really stupid. I have setup cruisecontrol.net for our builds. And it works fine if I run it from the commandline: ccnet.exe -p=TestLib

However if I run CCNET as a server or run it from start/programs it does completely nothing. I would expect the following script to build every 10 minutes.....

What am I doing wrong???

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<!-- This is your CruiseControl.NET Server Configuration file. Add your projects below! -->

<project name="TestLib">
    <triggers>
        <intervalTrigger seconds="600" buildCondition="ForceBuild"/>
    </triggers>

    <sourcecontrol type="svn" autoGetSource="true">
        <trunkUrl>xxxx://xxxxxxxxxxx/svn/testlib/trunk</trunkUrl> 
        <workingDirectory>c:\Projects\TestLib</workingDirectory> 
        <executable>C:\Program Files\Subversion\bin\svn.exe</executable> 
        <username>xxxxxxx</username> 
        <password>xxxxxxx</password> 
    <timeout units="minutes">5</timeout> 
    </sourcecontrol>

    <tasks>
       <msbuild>
            <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
            <workingDirectory>c:\Projects\TestLib</workingDirectory>
            <projectFile>TestLib.sln</projectFile>
            <buildArgs>/noconsolelogger /p:Configuration=Release;Platform=x86 /v:diag</buildArgs>
            <targets>Clean,Build</targets>
            <timeout>600</timeout>
            <logger>ThoughtWorks.CruiseControl.MsBuild.XmlLogger,C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
        </msbuild>

        <exec>
            <executable>copyfiles_testlib.bat</executable>
            <baseDirectory>C:\Projects</baseDirectory>
            <buildArgs></buildArgs>
            <buildTimeoutSeconds>60</buildTimeoutSeconds>
        </exec>
    </tasks>

    <publishers>
        <st开发者_运维问答atistics />
        <xmllogger />
    </publishers>
</project>


Log into the web admin central for the CCNET like -

http://localhost/ccnet/ViewFarmReport.aspx

Check that for the row containing your specific project the last column Admin has a button with title - Stop.

If it is showing Start instead then you need to click on it so that the project will be considered for building and clicking on Start will also toggle it to Stop.

Basically this step is called starting the integrator for the project.

Abhy N


Are you sure it isn't working? Because if you look at the docs for the -p param it says:

"Sometimes its useful to debug a specific project. If you use this option, CruiseControl.NET will start just the specified project, force a build on it, then shut down the server."

So... if you don't use the parameter it is going to wait 10 minutes before it builds the project, since that is the interval you have set.

I assume you mean you run it as a service?

  1. Are you sure the service is running? Check the service control panel. Is it set to start automatically and is it running? Check the log file. Did you follow the steps here http://confluence.public.thoughtworks.org/display/CCNET/The+Server+Service+Application to set up the service?

  2. Are you sure it has the credentials to access your working folder and artifact folder. The service should be running as a user with the credentials to access those folders.

  3. If you are sure it is running did you look at the dashboard? Does it show the project?

It would help if you could delete all the .log files... start the service then look at the log. Post it here if you still aren't sure what is going wrong.


I've had the exact same issue as Enrico:

From the command line if I run the project using -p to force a build, the build completes successfully.

When I double-click on the CCNET icon on the desktop (placed there at install time) the build process seems to start, then halt abruptly for no apparent reason.

CruiseControl.NET Server 1.5.7256.1 -- .NET Continuous Integration Server
Copyright c 2003 - 2010 ThoughtWorks Inc.  All Rights Reserved.
.NET Runtime Version: 2.0.50727.3053    Image Runtime Version: v2.0.50727
OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3        Server locale: en-CA

[1:DEBUG] The trace level is currently set to debug.  This will cause CCNet to log at the most verbose level, which is u
seful for setting up or debugging the server.  Once your server is running smoothly, we recommend changing this setting
in C:\Program Files\CruiseControl.NET\server\ccnet.exe.Config to a lower level.
[1:DEBUG] [FileChangedWatcher] Add config file 'ccnet.config' to file change watcher collection.
[CCNet Server:INFO] Reading configuration file "C:\Program Files\CruiseControl.NET\server\ccnet.config"
[CCNet Server:DEBUG] [FileChangedWatcher] Add config file 'C:\Program Files\CruiseControl.NET\server\ccnet.config' to fi
le change watcher collection.
[CCNet Server:WARN] Configuration does not have any version information - assuming the configuration is for version 1.5
[CCNet Server:INFO] Log cache time set to 5 minutes
[CCNet Server:INFO] Registered channel: tcp
[CCNet Server:INFO] CruiseManager: Listening on url: tcp://192.168.1.52:21234/CruiseManager.rem
[CCNet Server:INFO] Registered channel: tcp
[CCNet Server:INFO] CruiseServerClient: Listening on url: tcp://192.168.1.52:21234/CruiseServerClient.rem
[CCNet Server:INFO] Starting CruiseControl.NET Server
[CCNet Server:INFO] Initialising security
[CCNet Server:INFO] Starting extensions


From dashboard page, drill down into relevant project report, then select View Server Log. Observe and resolve a recurring exception.

These exceptions can also be viewed if you can see the CC.NET server's command line.

In my case, I saw an exception due to a directory that was removed from SVN, but server still wanted to pull it down to disk.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜