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

Accepted Answer
0 votes

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
Community showcase
Published Monday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

456 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