Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

What's the definition of the Build root directory in Bamboo?

Michael Roettger June 8, 2011

Hello

Bamboo 3.1. creates the build root directory based on project key, plan key and job key. Is there a chance to define a global build root directory across the plans (or at least across the jobs)?

The reason is that I have shared library source files which will be copied (as a prebuild step) into the project directory or included into the different compilations. Therefore I need clear defined folder names which I can use in build scripts or use as include directive in the project compilations.

Example: Project key=ABC, Plan1 key=PL1, Plan2 key=PL2, Job1 key=JB1, Job2 key=JB2. The build root directory should be at least "C:\..\ABC-PL1" for all PL1 jobs or (better) "C:\..\ABC" for all plans and jobs (instead of "C:\..\ABC-PL1-JB1" for plan 1 and job 1, "C:\..\ABC-PL1-JB2" for plan 1 and job 2 ... and so on).

Thanks for any help.

Regards

Michael

2 answers

2 votes
Jens Schumacher [Atlassian]
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.
June 19, 2011

Is there a chance to define a global build root directory across the plans (or at least across the jobs)?

Since Bamboo allows you to run Jobs on different agents, which are often run different physical servers, it is not possible to have one common root directory for a specific build with multiple Jobs. However, you do have a few options.

  1. If it's a simple build, just use one Job with multiple Tasks (3.1). All Tasks within a single Job share the same build directory.
  2. Use artifact passing to share libraries between different Jobs.
  3. Copy your files via a script or custom Task to a known, shared directory on a specific server. (Probably the most inconvinient solution)
2 votes
AjayA
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.
June 9, 2011

Hi Michael,


It's currently not possible to share build directory between plans - this is mostly due to concurrency reasons. if plan A is build then all the other plans have to wait till plan A finishes execution in order to build. Also, with the new concurrent builds feature you can execute multiple changesets of the same plan concurrently so its hard to get this working.

<address>
The reason is that I have shared library source files which will be copied (as a prebuild step) into the project directory or included into the different compilations. Therefore I need clear defined folder names which I can use in build scripts or use as include directive in the project compilations.</address>


We have artifact passing between jobs in Bamboo 3.1 - this means you can pass down the libraries between the jobs. Would this workaround fit your needs?

Also, if you have remote agents - then you can pass the artifacts betwen your job regardless of the agent location.

Cheers,

Ajay.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events