Is it possible to split build step?
Answered
Is it possible to split build steps by printing a particular string?
Our builds take up to 1h and some steps emit thousands of log lines, if we could subsection the steps timeline by printing a particular string that would be perfect to better navigate the build logs.
An example of what we have to deal with:
Cheers.
Please sign in to leave a comment.
Hello Paulo,

Yes, if you have control over how log entries are emitted, you could make use of TeamCity service messages feature, in particular, message blocks: https://www.jetbrains.com/help/teamcity/service-messages.html#Blocks+of+Service+Messages
This feature allows to emit messages in a specific format to stdout, which TeamCity will parse and act accordingly. There are multiple uses for those messages, but the link above highlights a message type which opens (or closes) a message block. For example, below command line script step:
will produce this output:
The message blocks could also be nested to allow for easier log traversal.
Thus, if you could emit the message before and after the larger log parts, the logs would be divided logically. Would this approach work for you?