Is it possible to split one build number between Bamboo project plans?

I use Atlassian Bamboo as my continuous integration server. For the project, Ive identified two plans, namely a development plan and a release plan. Unfortunately, Bamboo uses two separate build numbers for each of these plans. This prevents me from identifying the assembly in the project scope by its assembly number. Is there a way to share one build number between all the build plans for a project in Bamboo?

+8
build-process build-automation build bamboo
source share
3 answers

Yes, there is a way (workaround):

Use the plugins tool on this page: http://blogs.atlassian.com/2012/08/bamboo-maven-version-update-plugin . The plugin is called "Updating the Maven Version for Bamboo Variables", but does not require the use of Maven.

Follow the instructions in the link above to install the Bamboo plugin. Define a global variable in Bamboo named for example. "globalBuildNumberAutoupdate" with any number as a value (for example, 1001). Then include the task (in your Bamboo build plan) using the aforementioned plugin and set the “Regex for Bamboo variable mapping” to “Autoupdate” and remember to check “Enable global variables when matching and updating.”

Now you can use the variable $ {bamboo.globalBuildNumberAutoupdate} in your assemblies (instead of $ {bamboo.buildNumber}).

This works well for us using Atlassian Bamboo version 4.4.0.

Notice that the value for the global variable freezes for the assembly at runtime of the Bamboo Plan. Thus, all assembly steps in the same assembly plan will use the same value for the global variable, and they will use the value that the global variable had when starting the assembly. This also implies that the increased value will be used for the next build. But this is normal for us, as long as the value increases for all assemblies.

Hope this helps !:-)

+12
source share

It seems not. Each plan in Bamboo has its own counter, and it is not possible to share one line number among the plans.

+1
source share

Create one plan, for example, I use the name TRUNK (because it matches TRUNK in my SVN). And add the steps to it: Release, Debug, Code-Analysis and all you need.

0
source share

All Articles