Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Stamp build and release number to the application

Dylan October 16, 2013
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

0 votes
Gretchen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 16, 2013

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
TAGS
AUG Leaders

Atlassian Community Events