Search code examples
tfstfsbuildtfs-2015azure-pipelines

Access just the current BuildConfiguration in a Build Definition


Here is the setup: I have a vNext Build Definition that I have set "Multi-configuration" to true and am using the Variable "BuildConfiguration".

BuildConfiguration = QA, UAT, Live

When the code is checked in, I get three builds, one for each of the configurations.

Here is what I am trying to do: Unlike the Release Manager that has a field for 'NAME' which I can set very easily, the only option I have for the name to be displayed in the queue is to set the build number format under General. I want to add the current BuildConfiguration being used for the given build with the build number. I tried using:

$(BuildConfiguration) - Build.BuildNumber => QA, UAT, LIVE - 1234
BuildConfiguration - Build.BuildNumber => BuildConfiguration - 1234

Does anyone know how to access the current item being used in a comma separated list variable or is this just not possible?

I should point out, I am looking for this:

QA - 1234
UAT - 1234
LIVE - 1234

Solution

  • I could reproduce your scenario. Unlike Release that have multiple environment, in Build, although we have selected Multi-configuration, it's still in a single build, so you only can get one build name.

    enter image description here