This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
1 Replies Last post: Feb 22, 2013 3:23 AM by Christian Goetze  
Michal Galet Newbie 8 posts since
Apr 1, 2012
Currently Being Moderated

Feb 21, 2013 5:52 PM

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.
Christian Goetze Newbie 91 posts since
Aug 3, 2010

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.

More Like This

  • Retrieving data ...