是否可以在 TFS 2017 中将变量从 Build 传递到 Release? [英] 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.
是否可以像访问 Build.DefinitionId、Build.DefinitionName、Build.BuildNumber 等变量一样,从 Release 访问该变量?
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 ?
推荐答案
无法在您的发布定义中使用自定义构建变量.这是与您的问题类似的用户声音:https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/14515326-project-level-build-release-variables.您可以在下方投票和添加评论.
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.
作为一种解决方法,您可以将这些构建变量及其值复制到 变量组.然后将变量组添加到您的发布定义中.这是 TFS 2017 Update1 中的一项新功能.
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.
这篇关于是否可以在 TFS 2017 中将变量从 Build 传递到 Release?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!