Search code examples
tfscontinuous-integrationazure-pipelinesbuild-definition

TFS variables across multiple build definitions


How can I define variables in Team Foundation Server 2015 which are available across multiple build definitions for one project?

This is needed for a build number which is incremented every build and must be unique across multiple build definitions.


Solution

  • As the build ID is unique, instead of defining variables across multiple build definitions, you can simply specify the Build number format to $(date:yyyyMMdd).$(BuildId), check the screenshot below:

    enter image description here

    In this way, you'll get increased build number in multiple build definition:

    enter image description here