TeamCity email templates are implemented with Freemaker. The TeamCity exposes all build properties as hash table on SBuild.getBuildOwnParameters().
In the template the instance of SBuild is accessible under build variable. Freemaker allows calling bean properties, in our case it would be build.buildOwnParameters, map lookup thru square-bracket syntax [] and literals are enclosed in apostrophes.
#${build.buildOwnParameters['system.tc.branch.number']}.${build.buildNumber}
1 comment:
Thanks for your post. I tried your code example, but am getting this:
#[TEAMCITY TEMPLATE ERROR].1.0.2.17
Do you know why that is? Many thanks!
Post a Comment