【发布时间】:2017-09-28 12:57:42
【问题描述】:
我的构建定义中有几个秘密变量,我将它们传递给构建步骤的参数属性中的 powershell 函数,但是它们以 ******** 的形式发送而不是被解密。
我传递给 powershell 脚本调用的参数如下,其中 $(accesskey) 和 $(secretkey) 在构建定义中设置为机密:
-source "$(CodeDeploySource)" -destination "$(CodeDeployDestination)" -Description "$(Description)" -Location "$(Location)" -ApplicationName "$(ApplicationName)" -DeploymentGroup "$(DeploymentGroup)" -DeploymentConfig "$(DeploymentConfig)" -ak "$(accesskey)" -sk "$(secretkey)" -region "$(region)"
我的powershell脚本的参数部分是:
param(
[string]$source,
[string]$destination,
[string]$Description,
[string]$Location,
[string]$ApplicationName,
[string]$DeploymentGroup,
[string]$DeploymentConfig,
[string]$ak,
[string]$sk,
[string]$region
)
是否必须在 TFS 中启用配置才能在构建过程中解密秘密变量?
【问题讨论】:
标签: powershell tfs tfsbuild