views:

370

answers:

3

I am setting up a build system and would like to display which task failed the build in the "Project Report" section in the dashboard and in the build failure email.

At the moment I have three tasks:

  • SourceControl
  • Msbuild
  • Unit tests (using gallio.echo from CC.Net exec task)

If either of the latter two fail it's not obvious from the email or the build report page which task failed the build. I need to go through the logs to figure out where the error occured. I would like to at least know what task failed from the first glance.

Here is the best CruiseControl does - in the dashboard homepage:

msbuild fail alt text

Now, this is not enough:

  1. The failing task is not visible when you click on the project or the build report for that build.

  2. This information is not available in the log file at all. This means I can't event get it into the email by hacking the XSL.

  3. Since my build task will be the only MSBuild task, it's OK for it to be called MSBuildTask. This is not the case with Executable tasks, as I will have at least another one or two that might fail. I need to give them descriptive names. My Gallio exec task has description node, but I am not sure where it gets used.

    <exec>
    <description>Unit Tests</description>
    <executable>$(path.gallio)</executable>
    </exec>

A: 

It seems to me that you're not merging output of MSBuild and Gallio tasks. I don't remember the correct syntax from the top of my head (and the CruiseControl.NET website seems to be down), but if you post your config file I might be able to help you.

Bolek Tekielski
Yeah, the logs get merged, it's done in the `publishers` section before the `xmllogger` node. All the stuff from msbuild and from gallio task make it into the log file, it's just CruiseControl doesn't do anything about it.
Igor Zevaka
+1  A: 

Not an elegant solution, but you could use the OnError attribute on the target to log something even if it has to be somewhat static. The other option would be to log each successful step and then use an XSL last() to get the last successful step. It sucks, but it is at least more than you had before.

Josh
Cool, i'll try to give that a go.
Igor Zevaka
+1  A: 

Hi I'm one of the devs of ccnet. issue has been logged. http://jira.public.thoughtworks.org/browse/CCNET-1825

Williams
That's great, thanks for doing that.
Igor Zevaka
issue has been solved. take a build from 6910 or higher.you will now see the description of the task in dashboard and cctray.should there be any other need, feel free to contact us.http://groups.google.com/group/ccnet-userhttp://groups.google.com/group/ccnet-devel
Williams