Jenkins console showing lines of script out of order?

24 views
Skip to first unread message

dvpierce

unread,
Apr 6, 2015, 6:15:34 PM4/6/15
to jenkins...@googlegroups.com
Without getting too detailed, (my time, your sanity) we've got a few Jenkins jobs that kick off rather long shell scripts, which execute steps in parallel by using & operators. When the scripts have a "set -x" in the beginning, the lines get echoed to the Jenkins console. However, they appear to arrive out of order.

Script:

do thing 1 &
do thing 2 &
do thing 3 &
do thing 4 &
wait
do thing 5


Jenkins log:

+ do thing 2
+ do thing 1
+ do thing 3
+ wait
+ do thing 4
+ do thing 5


I'm assuming it's just a buffering problem, since the scripts appear to be executing properly (judging by the output), but I wanted to double-check with the smart people on the internet.

Any fix? If a manager sees this and asks about it, I don't really want to have to fall back to "umm... because it just does that?" as my answer. D-:

Thanks & Regards,
Dave P.
Reply all
Reply to author
Forward
0 new messages