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

This widget could not be displayed.

Hello Dan,

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

This widget could not be displayed.

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
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

106 views 2 0
Join discussion

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