how do I get git revision number in my bamboo release version tag

I have a deployment project set up in bamboo, my relase tag has the bamboo build number on it, but I want to add my git revision number
how do I get git revision number in my bamboo release version tag

I tried the following
1.2-${bamboo.buildResultKey}-${planRepository.revision}

comes out as

1.2-PROJ1234-${planRepository.revision}

3 answers

1 accepted

This widget could not be displayed.

please try: 1.2-${bamboo.buildResultKey}-${bamboo.planRepository.revision}

This widget could not be displayed.

That did it, thanks!

This widget could not be displayed.

I am using ${bamboo.CpmsVersion}.${bamboo.buildNumber}.${bamboo.planRepository.revision} to build my version but the revision comes out as a GUID

1.0.6.dc52de7df96caae56236cc79f9b840e1948dbdb3

I am using the version in a C# project and it is not happy with this version. How do i get the revision number as an integer from git (I am using BitBucket), is this even possible?

I am having the same issue - apparently every time I run a regular build rather than a customised one - I would expect planRepository.revision to be null in this case but it isn't.

AFAIK There's no such thing as version _number_ in git. The hash is the revision.

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 Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

146 views 2 0
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