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

Release Versioning on deployment: Best Practices?

Kai Neumann August 27, 2018

Hey there,

I am implementing CI with the help of Bamboo in my company and got some fundamental problem understanding how I would set up a deployment process with Bamboo's deployment-projects.
Right now we are working with GitFlow: So, for each feature/bug we create a branch and later on merge them into an development branch after code reviews were done. 
We are primarly using C# projects where the version number has to be known during compile-time (in AssemblyInfo.cs).
So, right now with each Merge into development a build is triggered which creates some version-number that is fixed in the code. If I want to use a deployment project now and set the release-version there, it won't make any sense because it is already hardcoded in my build-artifact.
Is there any advice or tutorial on how to do this in a proper way? 

Currently we create a release-branch for each planned release. In this release planch we set the planned version number (i.e. 1.2.3). What I want to achieve is that the version number is set during the deployment process.

2 answers

0 votes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 4, 2019

I know this is an old thread, but I wanted to share my experience on this topic, since I had the same experience. 

(I'm using the version 6.5.0 of Bamboo for my testing.)

What worked for me, while creating the "versionNumber.txt" file was actually to put the name of the variable, but without the "namespace". That means that what actually worked for me was to create a file with the data as...


 ... so without the "inject" part.

That, while configuring the Inject Bamboo variables --> Namespace, and setting the Namespace as Inject, will indeed create a variable that you can call as...

${bamboo.inject.bamboo.versionNumber} the Release versioning. 

That's just a little tweaking that I've had to do to make it work in my environment. ;-)

Also, apart from the manual effort on creating the file/variables, I've also tested this free plugin:
Maven POM Value Extractor

It works like a charm and is a very good alternative as well!



0 votes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 4, 2018

Build plan variable can be used in deployment Release versioning too.

  1. In the build plan that create the version number, create a file (example: versionNumber.txt) to store the version number in the following format: 
  2. Create an Inject Bamboo variables task in the build plan with the following setting
    • Path to properties file: versionNumber.txt
    • Namespace: inject
    • Scope of the variables: Result
  3. In the deployment project, set the following Release versioning:

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events