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

Your Points Tracker
  • 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
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?
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

elasticimages .bashrc exportes variables not available in scripts

We use vault and need to have it's env vars available to all tasks. In the elasticagent instance startup script I add these vars to /home/bamboo/.bashrc but they are not available in commands to any shell scripts. When I ssh into the instance and su to the bamboo user I see the env variables.



echo 'export VAULT_ADDR=' >> /home/bamboo/.bashrc
echo 'export VAULT_TOKEN="123456-123456-1234-12345-123456" >> /home/bamboo/.bashrc


This is not a problem on our remote agents.

2 answers

0 votes

Bamboo ignores .bashrc user profile when execute tasks as part of build process. All environment variables should come from task configuration, but not agent environment. It's required for build isolation from environment state.

In your case I'd suggest to keep these properties at file somewhere at agent and then read it during script task execution

So, all the scripts we have that needs these env vars will need to source. Not an acceptable solution because security reasons and job isolation for theses variables is not a requirement.  This is only an issue on elasticagents, on our remote agents these, and a few others, environment variables are exported before the agent is started so are available to all jobs. 

Suggest an answer

Log in or Sign up to answer
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 ...

185 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