Vladimir Perevalov
Vladimir Perevalov

Reputation: 4159

Manually update build number in Azure Pipelines

I have a build pipeline in Azure DevOps, for some reason it has lost the build number and started with zero again.

I want to update the build number, so it will continue from my last build number (25).

In team city, it is easy to update build number, here in azure I could not find where it is stored.

Upvotes: 0

Views: 1671

Answers (2)

starian chen-MSFT
starian chen-MSFT

Reputation: 33698

Refer to these screenshots for UI designer (Make sure there isn't whitespace at the end of variable value):

enter image description here

Result:

enter image description here

Upvotes: 1

Shayki Abramczyk
Shayki Abramczyk

Reputation: 41545

You can define a variable with counter:

variables:
  version: $[ counter('counter',25) ] 

In the build number use this variable:

name: $(version)

The above it's for yaml builds, in the classic editor is the same, define the variable in the variables tab and in the options tab put the variable in the build number format field.

More info about the counter you can find here.

Upvotes: 1

Related Questions