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

Hello,

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.

Thanks,
Michal


Attachment(s):
desired.png
current.png
1 comment

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.

0

Please sign in to leave a comment.