Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bamboo Versioning

I have a situation where i need to maintain version information of my builds. By googling i found limited information. one way is to create a version file on source control and keep updating. other is to use the source control revision number. final one is to use bamboo build number. i haven't implemented anyone of this before. colud anyone point out the pros and cons of each method.

Thank you, Reddy.

Please atleast tell me which method have u used to implement the same. Thnq..

like image 796
reddy Avatar asked Sep 16 '09 23:09

reddy


2 Answers

Visit http://confluence.atlassian.com/display/BAMBOO011/1.2.1+Using+Custom+Variables for more information about bamboo variables. Remember to define a system property in your job configuration like this: -DbambooBuildNumber=${bamboo.buildNumber} then you can use this property bambooBuildNumber in your maven or ant configuration file.

like image 52
m-szalik Avatar answered Oct 05 '22 23:10

m-szalik


Good question. I've done this in kind of an ad-hoc manner before. I don't strongly advocate the following approach, but I'll list it anyway for comparison with the (I hope) better approaches that others will soon be posting.

In order to maintain the version information in a medium sized Java codebase, I created a simple class to hold the major, minor, and revision version numbers as static constants and produce a formatted version string. I then created a perl script to check the class out of version control, replace the version components with those specified as arguments to the script, and check it back in.

The script does most of the work, so the process of updating the version is fairly simple and quick. I had to implement this quickly, so there are probably better ways of doing it. I just didn't have time, or motivation, to research better alternatives.

like image 41
A. Levy Avatar answered Oct 05 '22 23:10

A. Levy