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

0 votes
Accepted answer

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.

@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 Sign up to answer
Community showcase
Published 9 hours ago in Statuspage

194 years of downtime: looking back on incident data from 2018

Statuspage customers logged more than 194 years of collective incidents in 2018. That’s a whopping 87% increase from the  104 years logged in 2017 , and we aren’t even through December yet....

20 views 0 3
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