Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Unable to set custom variables in inline shell scripts

I've been having a time and a half trying to get a variable set within my plan.

On the fly I am compiling and packaging something up and I've parsed its name from a script. I want to use that name in a different task. Looking online it seems like the way to do this is writing what I need to file and using "Inject Bamboo Variables".

I have gotten to this point and I can use the "Dump Variables to log" task and I can see it inside there

in the log:
`Injected variable in LOCAL scope`

in the dump:
`key: [inject.PACKAGE] value: [ ] type: CUSTOM`

However when I try to call it in a inline shell script, I can't seem to access it and it comes back as empty. I've tried everything I can think of in terms of calling it:

- echo %inject.PACKAGE%
- echo %bamboo.inject.PACKAGE%
- echo $inject.package
- echo ${inject.package}

to name a few

can anyone help me and tel me what i am doing wrong?

1 answer

0 votes

I think the correct form (in Unix shell scripts) is $bamboo_inject_PACKAGE.

For windows batch script this answer to this is %bamboo_inject_PACKAGE%

Suggest an answer

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

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

918 views 4 7
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