Using a bamboo variable in git repository branch configuration

Is there any way to use a bamboo variable for the branch name when configuring a source repository?

I would like to be able to specify the tag name to fetch in a variable when releasing a version from JIRA.

2 answers

This widget could not be displayed.

You can use variables in the repository configuration, but the caveat is, the repository configuration needs to resolve to sth. that exists.

So if the tag already exists when you trigger the build it should work.

But if you create the tag during the build it won't work, as Bambo will try to find the revision on tag that not exists yet.

There might be a workaround but I haven't tried that:

- define repository with a variable in branch field

- set that variable to 'master' (or whatever that works)

- before checking out, use this Task: to change the value of the variable

I created the tag in the stash repository before doing the release from JIRA. I tried to run the release with the repository branch name set to ${bamboo.jira.version} but it didn't seem to parse the variable, saying it couldn't find the branch '${bamboo.jira.version}'. I tried the same with a custom Plan Variable but got the same result.

This widget could not be displayed.

Yes. We use a variable called and use it as ${} in the branch area

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 4 hours ago in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

18 views 0 1
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