【发布时间】:2018-10-23 04:18:06
【问题描述】:
我的Web.config 看起来像这样:
<connectionStrings configSource="secretConnectionStrings.config">
</connectionStrings>
secretConnectionStrings.config 存储带有密码的数据库连接字符串,并且不在源代码管理中。
我可以在“部署 Azure 应用服务”任务中看到以下内容:
如何更新我的 VSTS 发布管道,以便将 <connectionStrings> 部分替换为我提供的连接字符串(包括密码)?
我的 repo 是公开的,这就是为什么我不想在其中设置密码,并且只有受信任的人才能访问用于部署的 VSTS 帐户。
【问题讨论】:
-
您应该能够使用File transforms and variable substitution reference 完成这项工作。另外,你可以看看MSI。
标签: asp.net-mvc-5 azure-devops web-config connection-string azure-pipelines