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

5 Answers 5

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.

3
  • instead of maven or ant configuration file can I retrieve it from my Java class?
    – kamaci
    Feb 7, 2013 at 19:02
  • 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!
    – m-szalik
    Feb 16, 2013 at 23:48
  • 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.
    – kamaci
    Feb 17, 2013 at 16:01
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.

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

0

you can use ${bamboo.buildNumber} in ant

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

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

1
  • Added the internet archive version of the broken link. Oct 7, 2016 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.