Service Messages: Possibility to organize messages from parallel tasks into blocks


I couldn't find a way how to organize messages from parallel processes/threads into blocks. We have different kinds of builds that do things in parallel. I tried to use the flowId with but it doesn't work.

Example that simulates this:

echo "##teamcity[blockOpened name='Preparation step A' flowId='a']" echo "##teamcity[blockOpened name='Preparation step B' flowId='b']"
echo "It is prepared..." echo "##teamcity[message text='Message for A 1' flowId='a']" echo "##teamcity[message text='Message for B 1' flowId='b']" echo "##teamcity[message text='Message for A 2' flowId='a']" echo "##teamcity[message text='Message for B 2' flowId='b']" echo "##teamcity[blockClosed name='Preparation step B']" echo "##teamcity[blockClosed name='Preparation step A']"

There are actually 2 problems:

  1. Second blockOpened is opened inside the first one as an inner block.
  2. The tree view is confused by this and displays the output in a strange way (see screenshot current.png)

My question is: Can we somehow accomplish this with the existing functionality (screenshot desired.png)? I couldn't find any issue that would ask for something like this.


1 comment
Comment actions Permalink

Have you tried just using ##teamcity[message ...] within the concurrent execution block, possibly adorned with flowId? I don't think you can really get well defined behavior for blocks - I mean try to describe what should happen if for some flowId a new block is opened but others aren't done yet.

If you don't care about the real time tracking, or are willing to live with just the real time tracking provided by the simple progress message above, I'd just collect the output of every thread/process in a separate file and concatenarte them into nice blocks later.


Please sign in to leave a comment.