Is there a way to have bamboo load .bashrc or .bash_profile as part of the start up script so I don't have to export custom PATH & environment vars in every Script tasks?
For example, in each Script task anytime we want to do a ruby related script we need to include
# export PATH="$RBENV_ROOT/shims:$RBENV_ROOT/bin:$PATH"
It would be nice if this was loaded automatically somehow.
Instead of calling the Bamboo startup script directly, just source the .bashrc and then call the script. The exoprted variables will be visible to all script tasks run on the local agents. If you want to do the same for remote agents, you need to do the same - i.e. source the dot files first, then run the agent startup command.
Re: elastic agents. Yes, you can do it for the elastic agent. The easiest way is to add the necessary lines to .bashrc of the bamboo user using the instance startup script (have a look at your image configuration).
That script is run before the agent is started, so whatever you do there will be visible to the agent.
Can you elaborate on where to put the ". ~/.bashrc"
For a ubuntu 14 remote agent I am trying in the "start-agent.sh" file and running "./start-agent.sh"
. ~/.bashrc java -Djavax.net.ssl.trustStore=/home/devadmin/keystore -Dbamboo.agent.ignoreServerCertName=true -jar atlassian-bamboo-agent-installer-5.9.1.jar https://mybuildserver/bamboo/agentServer/ start
But the bashrc is still not loading for my tasks.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...
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!
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