Description
Summary
A script task targeting a file (as opposed to inline) started to work differently in 5.13, prepending the build directory to the target file on Windows.
Environment
- Windows
Steps to Reproduce
- In a version prior to 5.13, define a script task targeting a file found on the PATH.
- Upgrade to 5.13.
- Run the script task.
Expected Results
The script task will execute the file:
5.9.10
simple 30-Nov-2016 14:33:25 Starting task 'run it' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script' error 30-Nov-2016 14:33:25 Unable to find executable at fetch-repo.bat. Will try to run it anyway. command 30-Nov-2016 14:33:25 Beginning to execute external process for build 'sandbox - BSP28727 - Default Job #2 (SAN-BSP28727BSP-JOB1-2)'\n ... running command line: \nfetch-repo.bat\n ... in: C:\atlassian\Bamboo\5.9.10\data\xml-data\build-dir\SAN-BSP28727BSP-JOB1\n ... using extra environment variables: \nbamboo_capability_system_builder_msbuild_MSBuild_v2_0__32bit_=C:\Windows\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe\nbamboo_capability_system_builder_msbuild_MSBuild_v14_0__64bit_=C:\Program Files (x86)\MSBuild\14.0\bin\amd64\MSBuild.exe\nbamboo_resultsUrl=http://localhost:8085/browse/SAN-BSP28727BSP-JOB1-2\nbamboo_capability_system_builder_msbuild_MSBuild_v4_0__32bit_=C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe\nbamboo_capability_system_builder_msbuild_MSBuild_v3_5__32bit_=C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe\nbamboo_dependenciesDisabled=false\nbamboo_build_working_directory=C:\atlassian\Bamboo\5.9.10\data\xml-data\build-dir\SAN-BSP28727BSP-JOB1\nbamboo_buildKey=SAN-BSP28727BSP-JOB1\nbamboo_capability_system_docker_executable=C:\devtools\docker_toolbox\docker.exe\nbamboo_shortPlanName=BSP28727\nbamboo_capability_system_builder_msbuild_MSBuild_v3_5__64bit_=C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe\nbamboo_agentWorkingDirectory=C:\atlassian\Bamboo\5.9.10\data\xml-data\build-dir\nbamboo_capability_system_git_executable=C:\devtools\gfw\253\cmd\git.exe\nbamboo_buildNumber=2\nbamboo_shortJobName=Default Job\nbamboo_buildResultsUrl=http://localhost:8085/browse/SAN-BSP28727BSP-JOB1-2\nbamboo_capability_system_builder_msbuild_MSBuild_v2_0__64bit_=C:\Windows\Microsoft.NET\Framework64\v2.0.50727\MSBuild.exe\nbamboo_capability_system_jdk_JDK=c:\devtools\java\x64\jdk1.8.0_65\nbamboo_agentId=131073\nbamboo_planName=sandbox - BSP28727\nbamboo_shortPlanKey=BSP28727BSP\nbamboo_capability_system_jdk_JDK_1_8_0_65=c:\devtools\java\x64\jdk1.8.0_65\nbamboo_ManualBuildTriggerReason_userName=sysadmin\nbamboo_shortJobKey=JOB1\nbamboo_capability_system_builder_msbuild_MSBuild_v14_0__32bit_=C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe\nbamboo_capability_system_builder_msbuild_MSBuild_v4_0__64bit_=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe\nbamboo_capability_system_builder_ant_Ant=C:\devtools\ant\apache-ant-1.9.6\nbamboo_buildTimeStamp=2016-11-30T14:33:25.766-08:00\nbamboo_capability_system_builder_mvn3_Maven_3=C:\devtools\maven\apache-maven-3.0.5\nbamboo_working_directory=C:\atlassian\Bamboo\5.9.10\data\xml-data\build-dir\SAN-BSP28727BSP-JOB1\nbamboo_planKey=SAN-BSP28727BSP\nbamboo_capability_system_jdk_JDK_1_8=c:\devtools\java\x64\jdk1.8.0_65\nbamboo_buildResultKey=SAN-BSP28727BSP-JOB1-2\nbamboo_buildPlanName=sandbox - BSP28727 - Default Job\nbamboo_capability_system_hg_executable=C:\Program Files\TortoiseHg\hg.exe\n build 30-Nov-2016 14:33:28 "This is an Atlassian test." simple 30-Nov-2016 14:33:28 Finished task 'run it' with result: Success
5.12.5
simple 30-Nov-2016 14:51:02 Starting task 'run it' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script' error 30-Nov-2016 14:51:02 Unable to find executable at fetch-repo.bat. Will try to run it anyway. command 30-Nov-2016 14:51:02 Beginning to execute external process for build 'sandbox - BSP28727 - Default Job #3 (SAN-BSP28727BSP-JOB1-3)'\n ... running command line: \nfetch-repo.bat\n ... in: C:\atlassian\Bamboo\5.12.5\data\xml-data\build-dir\SAN-BSP28727BSP-JOB1\n ... using extra environment variables: \nbamboo_capability_system_builder_msbuild_MSBuild_v2_0__32bit_=C:\Windows\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe\nbamboo_capability_system_builder_msbuild_MSBuild_v14_0__64bit_=C:\Program Files (x86)\MSBuild\14.0\bin\amd64\MSBuild.exe\nbamboo_resultsUrl=http://localhost:8085/browse/SAN-BSP28727BSP-JOB1-3\nbamboo_capability_system_builder_msbuild_MSBuild_v4_0__32bit_=C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe\nbamboo_capability_system_builder_msbuild_MSBuild_v3_5__32bit_=C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe\nbamboo_dependenciesDisabled=false\nbamboo_build_working_directory=C:\atlassian\Bamboo\5.12.5\data\xml-data\build-dir\SAN-BSP28727BSP-JOB1\nbamboo_buildKey=SAN-BSP28727BSP-JOB1\nbamboo_capability_system_docker_executable=C:\devtools\docker_toolbox\docker.exe\nbamboo_shortPlanName=BSP28727\nbamboo_capability_system_builder_msbuild_MSBuild_v3_5__64bit_=C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe\nbamboo_agentWorkingDirectory=C:\atlassian\Bamboo\5.12.5\data\xml-data\build-dir\nbamboo_capability_system_git_executable=C:\devtools\gfw\253\cmd\git.exe\nbamboo_buildNumber=3\nbamboo_shortJobName=Default Job\nbamboo_buildResultsUrl=http://localhost:8085/browse/SAN-BSP28727BSP-JOB1-3\nbamboo_capability_system_builder_msbuild_MSBuild_v2_0__64bit_=C:\Windows\Microsoft.NET\Framework64\v2.0.50727\MSBuild.exe\nbamboo_capability_system_jdk_JDK=c:\devtools\java\x64\jdk1.8.0_65\nbamboo_agentId=131073\nbamboo_planName=sandbox - BSP28727\nbamboo_shortPlanKey=BSP28727BSP\nbamboo_capability_system_jdk_JDK_1_8_0_65=c:\devtools\java\x64\jdk1.8.0_65\nbamboo_ManualBuildTriggerReason_userName=sysadmin\nbamboo_shortJobKey=JOB1\nbamboo_capability_system_builder_msbuild_MSBuild_v14_0__32bit_=C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe\nbamboo_capability_system_builder_msbuild_MSBuild_v4_0__64bit_=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe\nbamboo_capability_system_builder_ant_Ant=C:\devtools\ant\apache-ant-1.9.6\nbamboo_buildTimeStamp=2016-11-30T14:51:02.276-08:00\nbamboo_capability_system_builder_mvn3_Maven_3=C:\devtools\maven\apache-maven-3.0.5\nbamboo_working_directory=C:\atlassian\Bamboo\5.12.5\data\xml-data\build-dir\SAN-BSP28727BSP-JOB1\nbamboo_planKey=SAN-BSP28727BSP\nbamboo_capability_system_jdk_JDK_1_8=c:\devtools\java\x64\jdk1.8.0_65\nbamboo_buildResultKey=SAN-BSP28727BSP-JOB1-3\nbamboo_buildPlanName=sandbox - BSP28727 - Default Job\nbamboo_capability_system_hg_executable=C:\Program Files\TortoiseHg\hg.exe\n build 30-Nov-2016 14:51:02 "This is an Atlassian test." simple 30-Nov-2016 14:51:02 Finished task 'run it' with result: Success
Actual Results
simple 30-Nov-2016 14:57:53 Starting task 'run it' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script' error 30-Nov-2016 14:57:54 Error occurred while running Task 'run it(1)' of type com.atlassian.bamboo.plugins.scripttask:task.builder.script. error 30-Nov-2016 14:57:54 com.atlassian.bamboo.task.TaskException: Failed to execute command, file C:\atlassian\Bamboo\5.13.0.1\data\xml-data\build-dir\SAN-BSP28727BSP-JOB1\fetch-repo.bat doesn't exist error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.plugins.script.task.ScriptBuildTask.execute(ScriptBuildTask.java:63) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$201(TaskExecutorImpl.java:317) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:246) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:317) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:118) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:74) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:215) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:221) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:137) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) error 30-Nov-2016 14:57:54 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) error 30-Nov-2016 14:57:54 at java.lang.Thread.run(Thread.java:745) simple 30-Nov-2016 14:57:54 Running post build plugin 'NCover Results Collector' simple 30-Nov-2016 14:57:54 Running post build plugin 'Artifact Copier' simple 30-Nov-2016 14:57:54 Running post build plugin 'npm Cache Cleanup' simple 30-Nov-2016 14:57:54 Running post build plugin 'Clover Results Collector' simple 30-Nov-2016 14:57:54 Running post build plugin 'Docker Container Cleanup' simple 30-Nov-2016 14:57:54 Finalising the build... simple 30-Nov-2016 14:57:54 Stopping timer. simple 30-Nov-2016 14:57:54 Build SAN-BSP28727BSP-JOB1-4 completed. simple 30-Nov-2016 14:57:54 Running on server: post build plugin 'NCover Results Collector' simple 30-Nov-2016 14:57:54 Running on server: post build plugin 'Build Hanging Detection Configuration' simple 30-Nov-2016 14:57:54 Running on server: post build plugin 'Clover Delta Calculator' simple 30-Nov-2016 14:57:54 Running on server: post build plugin 'Maven Dependencies Postprocessor' simple 30-Nov-2016 14:57:54 All post build plugins have finished simple 30-Nov-2016 14:57:54 Generating build results summary... simple 30-Nov-2016 14:57:54 Saving build results to disk... simple 30-Nov-2016 14:57:54 Logging substituted variables... simple 30-Nov-2016 14:57:54 Indexing build results... simple 30-Nov-2016 14:57:54 Finished building SAN-BSP28727BSP-JOB1-4.
Notes
For reference, the docs are unchanged:
https://confluence.atlassian.com/display/BAMBOO0512/Script
Select the location of the script file.
File — enter the location of the file in the Script file field. This can be either relative to the repository root of the plan, or absolute. You can include variables (see Bamboo variables).
https://confluence.atlassian.com/display/BAMBOO0513/Script
Select the location of the script file.
File — enter the location of the file in the Script file field. This can be either relative to the repository root of the plan, or absolute. You can include variables (see Bamboo variables).
Workaround
- Update "Script location" to the value: Inline
- For the "Script body" enter the name of the target file.
Attachments
Issue Links
- mentioned in
-
Page Loading...