Bamboo Versioning
Asked Answered
T

5

8

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..

Tulley answered 16/9, 2009 at 23:25 Comment(0)
P
4

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.

Pomology answered 18/1, 2012 at 14:4 Comment(3)
instead of maven or ant configuration file can I retrieve it from my Java class?Halliday
This "bambo.buildNumber" is inserted into filtered by maven properties file. You can also filter with maven your java classes as well as any other file. But I do not recommend that!Pomology
I didn't want to filter my Java class I was just looking for a way how to do that filtering at my Java class and I could do it implementing a custom maven plugin.Halliday
S
1

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.

Succentor answered 17/9, 2009 at 3:18 Comment(0)
D
1

I'm not entirely sure what your question is but I'm assuming you want build numbers? When you build your project with Ant you can use the BuildNumber task to keep track of build numbers.

Dinesh answered 18/9, 2009 at 7:21 Comment(0)
C
0

The following link is a pretty good article. If you can get all the plugins working with the version of Bamboo you're on it should be fine.

Release Management with Atlassian Bamboo (outdated)

Release Management with Atlassian Bamboo via the Internet Archive

Crusty answered 16/11, 2009 at 4:14 Comment(1)
Added the internet archive version of the broken link.Brow
D
0

you can use ${bamboo.buildNumber} in ant

look at the following thread http://forums.atlassian.com/thread.jspa?messageID=257319944

Diehl answered 9/6, 2010 at 10:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.