tfsreleasems-release-management

Is possible to pass a variable from a Build to a Release in TFS 2017?


A Build definition has a custom variable that can be set when a build is queued.

Is possible to have access to that variable from a Release in the same way that is possible to have access to variables like Build.DefinitionId, Build.DefinitionName, Build.BuildNumber ?


Solution

  • A custom build variable couldn't be used in your release definition. Here is an user voice that similar to your problem: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/14515326-project-level-build-release-variables. You could vote and add comment below.

    As a workaround, you could copy those build variables and their values to a Variable groups. Then add the Variable group to your release definition. This is a new feature in TFS 2017 Update1.