1

I'm new to FTL templates and I want to show the first 100 lines of the build log. I'm given the original script to show the entire build log from the TC documentation, which is this:

<#list build.buildLog.messages[1..] as message><#-- skipping the first message (it is a root node)-->
  <#if message.status == "ERROR" || message.status == "FAILURE" > 
    ${message.text}
  </#if>
</#list>

What should I add/change to only show the first 100 lines?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
user2679760
  • 31
  • 1
  • 9

1 Answers1

1

At the moment this answer only worked for me for the build_fail.ftl template, but changing the index range in build.buildLog.messages to 0..99 helped:

<#list build.buildLog.messages[0..99] as message>

I posted an answer on this blog and got an answer in my comment: http://www.mikeobrien.net/blog/build-timing-and-error-details-teamcity-notifications/

user2679760
  • 31
  • 1
  • 9