After Bamboo 4.2 upgrade script tasks won't excecute properly

Jay Barra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 20, 2012

I upgraded from 4.0 to 4.2 and now I have script tasks that will not run.

I give it the file name, a Windows batch script (.bat) and the directory it's located in.

Bamboo spits back errors:

"Unable to find exectuable at genproj.bat"
"Access is denied"
"Access is denied"
"Access is denied"

The script runs through additional subfolders setting up some structures so it looks like it actually is running the script but why is the task failing?

My bamboo agent on the build agent has not changed from when it worked with 4.0

Linux Bamboo build server, WindowsXP build agent

4 answers

1 accepted

0 votes
Answer accepted
Sultan Maiyaki
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 3, 2012

We have verified this as a bug in https://jira.atlassian.com/browse/BAM-12124. The workaround at the moment is to specify the full path where the batch file is placed

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 20, 2012

Eddie, you don't need to update agent jars.

0 votes
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 20, 2012

Did you update the remote agent to be the 4.2 jar, is ist running under the same user? Can you manually execute that script as the user that runs the bamboo remtoe agent?

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 20, 2012

Can you attach a sceenshot of your task configuration? Also, does the agent run as a service?

Jay Barra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 21, 2012

My image isn't uploading for some reason

But the configuration is like this

Task Description: Generate Project Files

Script Location: File

Script File: genproj.bat

Agrument: blank

Environment Variables: blank

Working Sub Directory: location_of_script (only 1 level down from the top level directory)

Jay Barra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 21, 2012

The agent is running as a service

Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 21, 2012

What if you change it to:

Script File: location_of_script/genproj.bat

Working Sub Directory: location_of_script (or whatever you need)

?

Jay Barra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 21, 2012

It is running as a service.

Sinead O'Neill August 26, 2012

Hi,

I am also having the same problem since upgrading Bamboo to 4.2.

I have a similar set-up to the one above where I use the Script Task to run a batch file. I am now getting an error saying that the file is no longer recognised as a batch file, thus causing the build to break.

Here is the error in the logs:

simple Starting task 'Moving files to profile.franchisee.com folder' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'

error Unable to find executable at Move_files.bat

command Beginning to execute external process for build 'Franchisee Profile - Move files'\n ...running command line: \nMove_files.bat\n ... in: E:\bamboo-home\xml-data\build-dir\FP-TRANSFER\n

error 'Move_files.bat' is not recognized as an internal or external command, operable program or batch file.

I tried your suggestion above to fill in the full path to the batch file, but as this folder name will change each time a build will run, this is not an option.

Is this a known issue in 4.2 or should I open a ticket for it?

Thanks,

Sinead

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events