如何添加.gitIgnore中的配置文件以天蓝色管道构建?

时间:2019-02-11 16:40:05

标签: azure-devops

我在gitHub存储库中有一个带有connectionStrings和其他我不想要的信息的json配置文件。有没有一种方法可以将其添加为恒定的静态文件,以便所有构建都可以访问它?

1 个答案:

答案 0 :(得分:0)

您可以将文件添加到“ Library”,然后在构建管道中下载该文件并使用它。

enter image description here

enter image description here

enter image description here

该文件将下载到代理中的一个临时文件夹中:

$(Agent.WorkFolder)\_temp\filename

在构建期间,您可以从那里获取文件并使用他。