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

Unable to set local vars from plan vars in script

Max van den Berk November 11, 2021

When I define anypoint_username=MyUserName as a Project variable,
I am not able to access it in a script task as documented in:

if [ -z "${bamboo.anypoint_username}" ]; then
echo "bamboo.anypoint_username not found, please set global variable."


1 answer

1 accepted

3 votes
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 11, 2021

Hello @Max van den Berk

Welcome to Atlassian Community!

To use variables in Bash, your need to call them differently:

Using variables in bash

Bamboo variables are exported as bash shell variables. All full stops (periods) are converted to underscores. For example, the variable is $bamboo_my_variable in bash. This is related to File Script tasks (not Inline Script tasks).

Kind regards,

Eduardo Alvarenga
Atlassian Support APAC

Max van den Berk December 2, 2021

Thank you, I'm so new I didn't even realise an answer was already given!

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events