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?

3 answers

1 accepted

This widget could not be displayed.

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.

This widget could not be displayed.

spam

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 10 hours ago in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

27 views 3 4
Join discussion

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