Powershell script always fails

In my bamboo job I have a powershell 'script' task ('Run as Powershell script' checked) with following content:

<?xml version="1.0" encoding="utf-8"?>
  <add name="CargoContext" connectionString="" providerName="System.Data.SqlClient" ></add>
"@ > ConnectionStrings.config

echo everything in order!

Ever since I added this task all builds fail, even though all tests are run and pass. I checked build logs and found following message (in red, probably meaning that this fails the build):

Unable to find executable at &('C:\Program Files\Bamboo\temp\CARGO-GATE2-JOB1-3-ScriptBuildTask-5984229618597029809.ps1'). Will try to run it anyway.

  1. Script executes normally (I can see the output in logs). Why is bamboo complaining? Can't it detect script generated by itself?
  2. Execution continues until all tests are ran and pass. If bamboo fails because of this task shouldn't it prevent next steps from running?
  3. How can I get this build to pass?

4 answers

1 accepted

@Marcin Gardias was right, the red warning didn't fail the build. I found following line in logs:

simple	18-kwi-2014 16:51:51	Starting task 'NUnit Parser' of type 'com.atlassian.bamboo.plugin.dotnet:nunit'
simple	18-kwi-2014 16:51:51	Parsing test results...
simple	18-kwi-2014 16:51:51	Failing task since test cases were expected but none were found.
simple	18-kwi-2014 16:51:51	Finished task 'NUnit Parser'

Nunit results parser couldn't find any test results (filename changed) and it failed.

I still don't know why red line didn't fail the build and line that actually failed it was indistinguishable from all the log noise.

It has also reported that for me too but my build doesn't fail. What version of Bamboo are you running?

0 votes

That 'unable to find executable' is only a warning that program you try to run is neither absolute path nor a path relative to working dir. We put this warning because in some cases it might be relevant (as in you expect executable to be on PATH but it's not)

Execution continues because the script didn't fail. It must be sth else. Please show the complete build log.

You were right, see my answer below

5.3 build 4101 -10 Dec 13

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,068 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