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

Next challenges

Recent achievements


  • Give kudos
  • My kudos


  • 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

Expose EC2 instance metadata in Bamboo build

I'm using Bamboo cloud to run a maven build on an EC2 instance.

Some of the tests require the local ip address of the instance. Of course, I can hard code that as either an environment variable or a system property in my build plan. However, this doesn't work well if the instance were to crash.

Luckily, Amazon provides the metadata service that allows me to get this value dynamically from any EC2 instance:


So essentially, I just want to execute that one line and place the resulting value in either an environment variable or a system property that can be used within my build plan.

I've read the Bamboo documentation up and down and tried several approaches (setting global variable, exporting environment variable in instance startup script, setting Maven environment variable in build plan, executing a script task), but none of them have worked.

Is there a way to do this that I'm missing?

1 answer

1 vote

You can create a script task that will output the required data into a file and then use the variable inject task to feed them into Bamboo.

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...

675 views 1 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