开发者

Reporting failed task in CruiseControl.NET

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 http://img38.imag开发者_如何学编程eshack.us/img38/1018/msbuildfail.png alt text http://img25.imageshack.us/img25/4688/galliofail.png

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>


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


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.


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜