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

Bamboo plan and branch variables

Ferenc Deak October 29, 2012

I have defined a plan variable (buildArguments) as being a list of parameters that are passed into a build script as

bamboo_build.sh ${bamboo.buildArguments}

(bamboo_build.sh is a script that is being checked out from the repository and it basically executes cmake with the given build arguments), on the Build Stage -> Tasks -> Build

Now, we have created a branch of our application which needs a different set of buildArguments, so I have created a variable in the branch too, the same name, with different values. But to my greatest surprise this is not overriding the plan variables, but is passing in the value of the new variable as extra environment variables to the script, which still gets the variables as arguments from the plan. Obviously my build process is not working anymore.

How can I override the plan variables in a branch?

5 answers

0 votes
Xabier Davila October 30, 2014

Can anyone point me to the bug issue in Atlassian support? I'm interested in branch variables, and would line to know if this has been resolved.

0 votes
PiotrA
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.
October 29, 2012

Hm... I'm worried you had encountered some bug in Bamboo. Especially the discrepancy between what is passed to the bamboo_build.sh and what is passed to the environment is worrying me. Can you raise your issue on http://support.atlassian.com ? I think Atlassian Supporters can help you in investigating this issue and fixing the problem. What do you say?

0 votes
Ferenc Deak October 29, 2012

Ok, I will open one support request!

Thanks

0 votes
Ferenc Deak October 29, 2012

Bamboo:

Version 4.0.1
Build Number 2907
Build Date 4/12/12


Sorry for the big screenshots ...

Here is the plan configuration regarding the variables:

here is the branch configuration regarding the variables:

Here is the task configuration:

and here is the output when running the build:

0 votes
PiotrA
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.
October 29, 2012

Hello Ferenc,

You say: " so I have created a variable in the branch too, the same name, with different value" - may you elaborate a bit how exactly you'd done that? Maybe a screenshot illustrating the configuration you use?

From your description it seems to me that you're doing exactly what you should in order to make the Bamboo use variable value from the Bamboo-Branch... So... Either you're encountering a bug (which Bamboo version do you use?), or there is some misunderstanding...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events