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:
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.imageshack.us/img38/1018/msbuildfail.png alt text http://img25.imageshack.us/img25/4688/galliofail.png
Now, this is not enough:
The failing task is not visible when you click on the project or the build report for that build.
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.
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>
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.