We're in the process of moving from QuickBuild to TeamCity. Our builds generate an html test summary file in the artifacts dir of a build that our devs want included in their email notifications, like they are with QuickBuild. The html file is also used as a custom tab on the server showing the test summary. Of course, failed builds don't always produce artifacts, so the file doesn't always exist.
I attempted to access the contents through the existing FreeMarker templates and serverside objects directly, but this doesn't appear possible, and I'm now attempting to write a plugin to expose the contents to the email notification templates.
I've used http://confluence.jetbrains.com/display/TCD8/Extending+Notification+Templates+Model as a starting point, but it appears I need a reference to the current SBuild object, and I can't find an obvious way to obtain it in the TemplateProcessor. Can anyone shed light on how to accomplish this? The indication seems to be that if I can add the contents to the map as a string like "testsummaryreport", that I'd be able to reference it from the email templates just like other supplied objects - 'build', 'project', 'buildType''var.buildChanges', etc.
Is all this in the right direction? I feel like I'm on the cusp here...