e-mail notification customisation

I am using TeamCity v5.1.1, and reading this page to try and understand how to customise my e-mail notifications:

http://confluence.jetbrains.net/display/TCD5/Customizing+Notifications+%28in+TeamCity+5.1%29

( I note that it says "This page has draft state and is subject to change.")

I am also looking at the files common.ftl and build_failed.ftl in the .BuildServer/config/_notifications/email folder.

In order to see what the default email looks like I triggered a failed build and received this:

TeamCity email.jpg
I think I understand how much of the text is derived, but the most important part of the message, the build log, or at least the last part of it, does not appear.

I realise that the first hyperlink (#0.7.0.14) links to the Overview page of the build results, but I need to provide an email message for users who may not have access to the machine on which the build agent is installed.

Secondly, where can I find a list of all the variables/properties that are available for incorporation into the notification emails?

Finally, the property build.buildNumber appears to prefix the buld number with a # symbol:  how can I get rid of it?

1 comment

Hi Ken,

> I think I understand how much of the text is derived, but the most important part of the message, the build log, or at least the last part of it, does not appear.
You can access the build log using Build.getBuildLog() method and extract important messages from there. But it is not included into notification message by default.
Please vote for the request: http://youtrack.jetbrains.net/issue/TW-7318

> I realise that the first hyperlink (#0.7.0.14) links to the Overview page of the build results, but I need to provide an email message for users who may not have access to the machine on which the build agent is installed.
What page do you wish to show users in case of build failure?

> Secondly, where can I find a list of all the variables/properties that are available for incorporation into the notification emails?
Do you mean the list from this page:
http://confluence.jetbrains.net/display/TCD5/Customizing+Notifications+(in+TeamCity+5.1)
?
The real objects (like build) can access all methods from the open API.

> Finally, the property build.buildNumber appears to prefix the buld number with a # symbol:  how can I get rid of it?
Default .ftl files contain '#' symbols as well as ${build.buildNumber}, and there is just one '#' on your screenshot.
Are you sure that ${build.buildNumber} includes the hash?


---
Maxim

0

Please sign in to leave a comment.