The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Inherited variable values

Alessio Caprari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 8, 2012

I have a task executing a script which takes the value of ${bamboo.repository.branch.name} 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 ${bamboo.repository.branch.name} as a default when no value for 'custom_branch' has been provided.

I tried using exactly ${bamboo.repository.branch.name} 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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Alessio Caprari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 18, 2012

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

https://jira.atlassian.com/browse/BAM-8266

0 votes
ArmenA
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 Champions.
November 11, 2012

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?

Cheers,
Armen

TAGS
AUG Leaders

Atlassian Community Events