Bamboo plan and branch variables

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

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...

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:

Ok, I will open one support request!

Thanks

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?

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.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,070 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot