We use TeamCity Services messages to fail a build, like so:
##teamcity[message text='Jus a sample for this post' errorDetails='Sample Error Details' status='Error']
Now, this will add the error (when it occurs) to the overview page of a completed build. However, the build errors are not included in the failure email.
We found this code from another thread and attempted to modify build_failed.ftl:
<#list build.buildLog.messages[1..] as message><#-- skipping the first message (it is a root node)-->
<#if message.status == "ERROR" || message.status == "FAILURE" >
However, that didn't add the Build Errors to the failure email.
Any idea what we're doing wrong?