Build-specific variables no longer available?

We are leveraging Build Specific Variables in a script task in our build plan.  As per the documentation:

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

However, sometime over the course of the weekend on May 9th the variables are no longer available to our script task.  Specifically, last the successful build was May 8th, and all builds after May 11th fail.  We've attempted to use both inline (preferred) and file-based approaches.  In either case the variables are not being populated.  Here's a sample of the script:

echo "bamboo dependency parent total $bamboo_dependency_parent_total $dependency_parent_total"
echo "bamboo dependency parent total $BAMBOO_DEPENDENCY_PARENT_TOTAL $DEPENDENCY_PARENT_TOTAL"
parentPlanIndex=`expr $bamboo_dependency_parent_total - 1`
echo "parent plan index: $parentPlanIndex"
parent_plan_dynamic_var="bamboo_dependency_parent_$parentPlanIndex"
parentPlanKey="${!parent_plan_dynamic_var}"
echo "parent plan key: $parentPlanKey"

Which produces the following log output:

build 21-May-2015 03:08:19 bamboo dependency parent total 
build 21-May-2015 03:08:19 bamboo dependency parent total 
error 21-May-2015 03:08:20 expr: syntax error
build 21-May-2015 03:08:20 parent plan index: 
build 21-May-2015 03:08:20 parent plan key: 
build 21-May-2015 03:08:20 Couldn't determine parent plan that triggerd remote deploy

Whereas back when the variables were being substituted correctly the log output was like so:

build 08-May-2015 14:26:32 parent plan index: 1
build 08-May-2015 14:26:32 parent plan key: ECMDEV-ECMBAT-500
build 08-May-2015 14:26:32 calling ciDeploy for batch

(Note that the first two echo statements in the script block above were added after the build failures started in an effort to debug various variable referencing schemes)

 

Can someone help me understand why the variables are no longer available to my script task?

2 answers

1 accepted

0 vote

Hello Dan,

Please create request at support.atlassian.com to allow our support to help you

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
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,582 views 0 6
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