Accessing bamboo.buildnumber

Greetings from a Bamboo newbie. Background: I'm a developer on a project that uses Bamboo to build releases. The administration of Bamboo is handled on another continent.

I'd like to display the Bamboo build number in my .NET application, e.g. 'About' dialiog and event logging. As an example of what I'm seeking, in the past I've created postbuilds scripts that fetch SVN info and insert it into a file used by the application (AssemblyInfo.cs for you .NET types!). Could anyone point me in the right direction? I've seen some web posts about Bamboo providing a REST API; could I go that route? Suggestions and examples welcome.

Thanks very much for your help.

1 answer

1 accepted

Hi John,

You can use the default build specific variable: "bamboo.buildNumber". The usage format for all build-specific variables is: ${bamboo.varName}. You can find more information about using global, plan or build specific variables on this page:

https://confluence.atlassian.com/display/BAMBOO/Using+global,+plan+or+build-specific+variables

Hope this helps.

Best,

Sepideh

Hello Sepideh,

Thanks for your prompt reply and suggestions. Before I posted my question I had read the page you pointed to and it seemed to be exactly what I want.

To follow up, do you have a suggestion on how I might run a DOS script to access the bamboo.buildNumber variable? My only interface to Bamboo at the present time is the web interface; it's not running on a system I administrate. I'm just a 'web customer' at the present time.8^) An example would be wonderful. Thanks.

Best regards,

John

Agreed. Examples are certainly lacking in use of variables.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,096 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot