Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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.

 

Thanks

Siddu

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="${bamboo.build.working.directory}" -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 5.11.1.1 (but still in trial-mode)

Capture.PNG

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

STUFF=${bamboo.stuff}

I get...

${bamboo.stuff}: bad substitution

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

250 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you