VSTS与安全文件的持续集成

时间:2018-02-17 11:46:28

标签: continuous-integration azure-devops continuous-deployment azure-pipelines continuous-delivery

Hello Stackoverflowers,

我最近在GST上用VSTS上的CI-CD玩了很多。我有一组Build任务,它们引用安全文件。我使用“下载安全文件”任务在构建时访问这些文件。但是,我想知道是否有办法提交这些文件或至少自动从我的开发环境更新它们。目前,这些文件需要手动上传,这是错误的。 感谢

2 个答案:

答案 0 :(得分:1)

目前,无法自动更新安全文件。您需要手动上传安全文件。

在上传已存在的安全文件名时,您需要删除现有文件名并添加具有相同名称的新文件名。

并且有用户声音Allow us to update an existing Secure File instead of having to delete and re-upload表明此功能,您可以投票和跟进。

答案 1 :(得分:0)

您可以使用API​​删除和上传库中的安全文件。

要删除安全文件,请使用 PUT API
https://dev.azure.com/{organization}/{project}/_apis/distributedtask/securefiles/{secureFileID}?api-version=5.0-preview.1

为了安全上传文件,请使用 POST API https://dev.azure.com/{organization}/{project}/_apis/distributedtask/securefiles?name={fileName}&api-version=5.0-preview.1

Content-Type =应用程序/八位字节流