How to configure Ivy repository isolation?

There's a section of the Bamboo documentation that deals with isolating repositories for Maven executables. We're running into similar problems with Ivy, when multiple stages are run in parallel and cause issues with the shared Ivy repository.

In order to solve this problem, we'd like to configure each agent to have their own isolated Ivy repository. This could be acheived if there was a Bamboo build-time variable identifying the agent that the build is being run on. However, looking at the variable documentation, I can't see any such variable. Does any such variable exist?

If not, does anyone else have any ideas how this might be resolved?

2 answers

1 accepted

Accepted Answer
0 votes

I don't think we have a variable for that atm. What you could do instead (apart from writing a plugin):

  • on remote agents, set an environment variable in a script starting the agent. Your best option would be the content of <id> tag from bamboo_agent_home/bamboo-agent.cg.xml
  • on local agents, it's trickier you can extract the id from variable called "build.working.directory" It will be the last number in the path right before the string avaialble in "buildKey" variable.

I've opened an improvement request to make agent id available via a variable - please watch and vote.

You can also use bamboo.agentId on recent versions of Bamboo.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

101 views 3 7
View post

Atlassian User Groups

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!

Find my local user group

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

Groups near you