Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Release Versioning on deployment: Best Practices?

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

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: 
    inject.bamboo.versionNumber=1.2.3
  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:
    ${bamboo.inject.bamboo.versionNumber}
0 votes
thePair Atlassian Team Jan 04, 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...

bamboo.versionNumber=1.2.3

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

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

 

Cheers!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

223 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you