Bamboo Plan Variables not working for me

I am having trouble making use of Plan Variables in Bamboo.

I added a plan variable, name: stuff, value: 1.2.3


In my "Default Job", I have a Script (File) task calling a command line utility, passing in a few parameters, including: ${bamboo.stuff}

Unfortunately, what is being passed is "${bamboo.stuff}", not "1.2.3"

Other built in bamboo properties are being passed in just fine, just not my plan variable.

I've tried: ${stuff}, $stuff, $bamboo.stuff, ${bamboo_stuff}, %STUFF%, %BAMBOO_STUFF%, and others, but I can't get it to respond.

What am I doing wrong?

2 answers

This widget could not be displayed.

If it is Unix  — you should call ${bamboo.stuff}

windows -   %bamboo.stuff%

within java -   bamboo_stuff

These all worked for me.

If above does not worked, send me the version of bamboo, platform on which it is running and screenshot of variable and script.




Sorry, forgot to mention I'm in Windows.

The Script Task uses File as its location, and as an example of my Argument value:

-root="${}" -test=${bamboo.stuff} -revision=${bamboo.repository.revision.number}

What I get passed to me, root and revision are replaced correctly.  But for test ==> ${bamboo.stuff}

Bamboo (but still in trial-mode)


This widget could not be displayed.

Using ${bamboo.stuff} will only work if you use the Script Task with an inline script.
Bamboo will replace any variable references it sees there before it starts running the script.
If you let the Script Task with the script in a file, Bamboo will not get a chance to replace the variables.

So one solution would be to use an inline script instead of a file.

If you need to stick to a file script, you need to use the environment variables that Bamboo creates.
In your case you should be able to reference the variables with %BAMBOO_STUFF%.
You wrote that you already tried that, but it didn't work.
To investigate this, you can add a simple Script Task that just calls "set".
In the build log you can then see all environment variables. 

I tried your SET idea, and though it listed out nearly 100 items, "stuff" is nowhere in the list.  sad

For Linux style inline script, the ${bamboo.stuff} syntax did NOT work for me, that is when I do the following in my inline script


I get...

${bamboo.stuff}: bad substitution

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
Published 6 hours ago in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

38 views 0 8
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