Stamp build and release number to the application

Hi, What would be the best way to pass the build and release number to the releasing application through Bamboo? Just as Atlassian Bamboo version 5.1.1 build 3902 - 12 Sep 13 for Bamboo

1 answer

Probably depends on your language. I would expect you could do something like assign an argument with the value of the build variable or something along those lines. In Java for example I think you'd use a -DVersionNumber=${bamboo.current.version}_build-${bamboo.buildNumber} or something like that as a build argument. Then in your source you'd need to have a way to pull "VersionNumber" into the application. like substitute into a properties file or build.xml or something along those lines. Incidentally the current.version variable is made up by me, but the buildNumber is a bamboo built in variable. Those would be passed in at compile time and presumably substituted into the application you are building. Not being a java programmer I'm speculating here, but it might give you some ideas on how to move forward. No idea what best practices are in this area.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
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,498 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