Running a script using the Script plugin reports all standard out as errors in bamboo log

When I run a script in Bamboo using the Script plugin, all of the standard out from the script is reported as an error in the Bamboo log ang is reported in the Error Summary. Is there a way to get it to ignor standard out for logging? I even tried to redirect the std.out to a file to see if I could hide it, but that didn't work. The script that I'm running is nosetests with the xunit output parameter. Here's a sample of the standard out that I get that it shows an error:

Ran 0 tests in 0.088s


Shows like this in the log:

error	18-Jun-2014 11:44:30	
error	18-Jun-2014 11:44:30	----------------------------------------------------------------------
error	18-Jun-2014 11:44:30	Ran 0 tests in 0.088s
error	18-Jun-2014 11:44:30	
error	18-Jun-2014 11:44:30	OK

2 answers

1 accepted

0 votes

Hi Marc,

Thank you for your question.

There are a few things I would suggest you on doing:

nosetest > text.txt 2>&1


nosetests --processes 4 &> output.txt

nosetests --with-xunit --xunit-file=test_output.xml


The option to make it as quiet as possible (-q for all of them)
The option to turn off output capture (-s works for both pytest and nose, not needed for unittest)

nosetests -q -s test_fixtures:TestSkip

Kind regards,

The first option worked great. It still confuses me as to *why* a standard out print statement is interpreted as an error in Bamboo. Shouldn't it me more of an informational item and not an error?

You can always specify what results are successful and what are failures. I've got another post on here somewhere where I go into some detail on how to structure that. My examples are based on the documentation for error levels on robocopy which you can google and find. Robocopy always returns a non-zero return code which is only a "failure" when the number is above 7. So when you script with that you have to force the return to 0 so that the build task reads as successful. As long as you can test for success or failure in your script you can return 0 or return (non-zero) and force the script to succeed or fail based on your criteria instead of the default.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,087 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot