Inherited variable values

I have a task executing a script which takes the value of ${} as argument.

Sometimes we want to override this value using a custom one. So I thinked to a variable named 'custom_branch' to be used as argument, but I don't know how to use ${} as a default when no value for 'custom_branch' has been provided.

I tried using exactly ${} as the value of 'custom_branch', but it was used literally.

Is there a way to use this kind of inherited values for variables?

2 answers

1 accepted

This widget could not be displayed.

I found my use case is not supported yet, but there is a feature request for it:

This widget could not be displayed.

Hi Alessio,

Thank you for contacting Atlassian support. If you are going to use the variables in a script task, then you can manually check the content of custom_branch variable (${bamboo.custom_branch}) by using a conditional statement. If you want to use that variable somewhere else (like in the argument field in your specific case), then Bamboo doesn't have such a capability to check the variables and decide which one to use.

We are tracking this new feature request to which you can add yourself as a watcher, vote or comment. Do you have any further questions or concerns?


Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published yesterday in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

133 views 0 9
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