Bamboo cannot find build script on Windows boxes
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Symptoms
When bamboo triggers the builder (ant) it cannot find the build script. For example,
1
2
3
4
5
6
7
Starting to build 'ASYNCPROC - ASYNCPROCBASE'
... running command line: D:\devtools\apache-ant-1.7.1\bin\ant.bat \-f build.xml make
... in : D:\Documents\Project\CI\Bamboo\jisano3\bamboo-home\xml-data\build-dir\ASYNCPROC-ASYNCBASE\build
... using java.home: D:\devtools\Java\jdk1.5.0_17
16-Apr-2009 06:30:00 Buildfile: build.xml does not exist\!
16-Apr-2009 06:30:00 Build failed
Diagnosis
Add more debug to your Ant build (For example; to ant.bat : echo "BAMBOO" %cd%)
1
2
3
4
5
6
7
8
9
10
11
22-Apr-2009 11:08:35 Building started with AntBuilder command
22-Apr-2009 11:08:35 Starting to build 'Async_batch - asyncbatchplan'<br />
... running command line: D:\devtools\apache-ant-1.7.1\bin\ant.bat \-f build.xml clean test<br />
... in : D:\Bamboo\bamboo-home\xml-data\build-dir\ASYNCBATCH-ASYNCBATCHKEY\build<br />
... using java.home: D:\devtools\Java\jdk1.5.0_17<br />
... using extra environment variables: \-Dbasedir=D:\Bamboo\bamboo-home\xml-data\build-dir\ASYNCBATCH-ASYNCBATCHKEY
22-Apr-2009 11:08:35 BAMBOO D:\*
22-Apr-2009 11:08:35 Buildfile: build.xml does not exist\!
22-Apr-2009 11:08:35 Build failed
In the except above, it is clear that ant starts off in the wrong directory.
Cause
The Windows command shell has been configured to run a command when it is invoked via windows registry key,
1
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
The key was set AutoRun to cd\ . Which makes all commands files automatically run from the root.
Solution
Resolution
Disable cd <root> autorun
feature in the registry key to allow the command shell to start from the directory it is invoked from.
Alternatively, vote for JIRA issue BAM-3858 to be resolved.
Was this helpful?