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

Accepted Answer
1 vote

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 Sign up to answer
Community showcase
Published 12 hours ago in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

161 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