您可以在 Visual Studio Team Services 中存储发布计划中的工件吗?

Can you store artifacts from a Release plan in Visual Studio Team Services?

我在 Visual Studio Team Services Online 中有一个发布计划,该计划在部署 Web 应用程序后运行小型 UI 测试(使用 Selenium)以确保应用程序正常运行。

我想将此版本的屏幕截图存储为工件,以便在版本完成后可以访问它们(主要是为了防止测试失败)。

这可以使用 VSTS 吗?

我尝试将复制发布工件任务作为我的发布计划的一部分,但这只会产生一些错误,例如 System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'StagingFolder' because it is null.

您可以使用“##vso[task.uploadfile]”命令来执行此操作。

View and download attachments associated with releases

Would you like to upload additional logs or diagnostics or images when running tasks in a release? This feature enables users to upload additional files during deployments. To upload a new file, use the following agent command in your script:

Write-host "##vso[task.uploadfile]"

The file is then available as part of the release logs. When you download all the logs associated with the release, you will be able to retrieve this file as well.