Bamboo variable for second repository

Is there a way to use a bamboo variable to reference the second source repository of a project. I can reference the default with ${bamboo.repository.svn.repositoryUrl} but how can I reference a second url without creating some custom/plan variable? There's no way to reference ${bamboo.repository.svn.repositoryUrl.repo2} ????

6 answers

1 accepted

They're trying to checkout from two different paths in the same repository. I believe the id you're referring to differentiates subversion instances which is not what we have here.

I may have to go with the hack, by putting the repository urls in global variables and reference them in the Source Repository setups and as a global variable also in the scripting piece. It works, jus thought there was a better way.

You will get different 'IDs' as soon as you define more than one source repo in the bamboo plan. Checking your plan configuration should tell you if this is the case.

Using the plugin you would be able to reference them both using these variables


Hi Dave,

I recall there is undocumented way to reference non-default source repository in bamboo variables. Although at the moment I can't check how exactly it is done (I can do that on Monday). I vaguelly remember that you need to specify a number in a variable name, so I'd try something like this:


...I remember that the number is injected somewhere between two dots in the variablle name.

Tried those three with leading $, plus ${bamboo.repository.svn.repositoryUrl.1} and they all give me bad substitution.

${bamboo.repository.svn.repositoryUrl.1}: bad substitution

Well, in that case I'll check the variable syntax for you on Monday, ok? Please ping me here if I forget...

You can find the magic number(s) for non-default repositories if you look at the Metadata page for a completed build; in the list of variables, you should see entries like this:


for each non-default repository that's part of the build plan.

Eddie Webb Community Champion Apr 19, 2013

@Piotr is right, but I think to @bdyck's poitn, the numbers are the full ID of the repository (i.e. 78586993) and not the ordered number. You can see them listed on the metadata page, just copy the whole variable name string and wrap it in ${}


You could use this plugin to map these repo's to a name of your choice:

(disclaimer: I wrote it :-) )

Hello Dave,

I'm afraid that this particular variable you're after (bamboo.repository.svn.repositoryUrl) is not using the mechanism I was talking about. So as for your question my current answer is "no, you can't reference second SVN repository url".

Just for completeness - the mechanism I was talking about in the other answer injects a repository ID (not an ordering number like 1 - I was wrong on that) between the *second* and *third* chunk of the variable name. So with the example of ${bamboo.repository.svn.repositoryUrl} I'd expect that one can reference multiple repositories with a syntax like


Where the numbers are ID's of plan repositories.

Is there anything else we can help you with?


0 votes
Alex Wei Atlassian Team Apr 26, 2016

I found the solution at

${bamboo.planRepository.repositoryUrl} points to the first repo in your "Source Code Checkout" task. The more specific URLs are referenced via:


and so on.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

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

1,066 views 0 5
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot