Modify build id

Hi guys,

as we moved from Subversion to Git we can no longer use Subversion’s revision number for our build number. Therefore I was looking at the Continua CI database for a unique number that could replace the revision number. I decided to give the id from dbo.builds_build a try as it is available to the Continua CI configuration via %Build.Id%.

The build id counter is at about 9000 and we would like to bump it to a higher number in order to get a higher number than our latest svn revision. Is there a way to bump the id or is there another counter that would work?

Regards

Kay Zumbusch

Hi Kay,

The build id is a database table identity and is linked to the foreign keys of other database table. It possible to change it but difficult and not recommended. Use the build number ($Build.Number) - you can reset the starting number for this by setting the Version Counter on the Details page of the Configuration Wizard. 

Hi Dave,

I don’t want to update existing build id but increase the counter that is responsible for the next build. Is the next build number based on the largest number in the database table?

Regards

Kay Zumbusch

Yes, the build number is incremented on each build. You can set it to any number using the Version Counter field on the Details page of the Configuration Wizard.


If there is no way to modify the counter for the build id We have to try something else.

Regards

Kay Zumbusch

I’m not understanding the issue here? The build number, $Build.BuildNumber$, is the counter for each build. It can be modified. Enter a number higher than 9000 into the Version Counter field. The next build will then have that build number and the build number will be incremented each subsequent build. 

Hi Dave, We need an increasing build number across multiple configurations and projects. Therefore $Build.Id$ seemed suitable.

Hi Kay,

There are currently no global counters that you can use, but we are planning to implement persistant variables which can be used for this purpose in the future.

You can enable project-wide versioning in the project wizard. This will allow you to use the same build number across configurations in the same project, but not across different projects.