Azure 文件复制在构建管道中的第二个 运行 失败

Azure File Copy failing on second run in build pipeline

我在 Azure Devops 中使用 "Azure File Copy" 任务,据我所知,它使用 Az 复制命令将文件复制到 Azure 存储中。

这是我的任务定义:

[注意 - 这是任务的 v3]

这在构建管道中的第一个 运行 任务上工作正常,并按预期在容器中创建文件(如下所示):

当我运行管道中的后续任务时,它失败了。我从错误中可以看出它似乎在提示覆盖选项 - Yes/No/All。见下文:

我的问题: 有谁知道我如何给出任务参数来告诉它每次都强制覆盖? Microsoft 网站上的相关文档不是很好,我在 Github 存储库中找不到示例。

提前感谢您的指点!

完整错误:

    & "AzCopy\AzCopy.exe" /Source:"D:\a\s\TestResults\Coverage\Reports" /Dest:"https://project1.blob.core.windows.net/examplecontainer" /@:"D:\a\_tempc17ff3-27da-46a2-95d7-7f3a01eab368" /SetContentType:image/png /Pattern:"Example.png"
[2020/04/18 21:29:18][ERROR] D:\a\s\TestResults\Coverage\Reports\Example.png: No input is received when user needed to make a choice among several given options.
Overwrite https://project1.blob.core.windows.net/examplecontainer/Example.png with D:\a\s\TestResults\Coverage\Reports\Example.png? (Yes/No/All) [2020/04/18 21:29:18] Transfer summary:
-----------------
Total files transferred: 1
Transfer successfully:   0
Transfer skipped:        0
Transfer failed:         1
Elapsed time:            00.00:00:01
##[error]Upload to container: 'examplecontainer' in storage account: 'project1' with blob prefix: '' failed with error: 'AzCopy.exe exited with non-zero exit code while uploading files to blob storage.' For more info please refer to https://aka.ms/azurefilecopyreadme

与其说是解决方案,不如说是解决方法,但我将其设置为任务的版本 1,它对我有用!