【发布时间】:2019-12-05 19:01:34
【问题描述】:
我有一个非常简单的发布管道,只需要做几件事:
- 下载要发布的工件。
- 使用 Tokenize In Archive 步骤替换一些配置值。
- 部署 Azure 应用功能
如我所料,工件以 zip 文件的形式下载。 当管道进入第 2 步时,存档中的标记化步骤我收到有关另一个进程已锁定文件的错误:
2019-12-05T18:46:30.3959242Z ==============================================================================
2019-12-05T18:46:30.3959351Z Task : Tokenize in Archive
2019-12-05T18:46:30.3959415Z Description : Allows you to tokenize within an archive without unpacking.
2019-12-05T18:46:30.3959494Z Version : 1.1.2
2019-12-05T18:46:30.3960010Z Author : Solidify Labs
2019-12-05T18:46:30.3960106Z Help : [More Information](https://github.com/solidify/vsts-task-tokenize-in-archive)
2019-12-05T18:46:30.3960203Z ==============================================================================
2019-12-05T18:46:33.9236236Z Searching for all My.Functions.App.zip files at d:\a\r1\a\dist
2019-12-05T18:46:33.9236804Z Searching for local.settings.json inside MyFunctions.App.zip files
2019-12-05T18:46:34.0743681Z
2019-12-05T18:46:34.0755112Z GAC Version Location
2019-12-05T18:46:34.0755702Z --- ------- --------
2019-12-05T18:46:34.0801996Z True v4.0.30319 C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.IO.Compression.FileSystem\v4.0_4.0.0.0__b77a...
2019-12-05T18:46:34.0843963Z Matched zip: D:\a\r1\a\dist\MyFunctions.App.zip
2019-12-05T18:46:34.4714977Z ##[error]System.Management.Automation.RuntimeException: Another process has locked the 'D:\a\r1\a\dist\MyFunctions.App.zip' file.
我尝试将 zip 文件复制到另一个目录并在那里进行标记。 我还写了一些 Powershell 来查看该文件是否为只读文件,而它似乎不是。 管道在默认的 Azure Pipelines 托管代理中运行,因此我不确定还有哪些其他进程可能会锁定文件。
有没有人见过这种情况或有解决这种情况的方法?
谢谢。
【问题讨论】:
标签: azure azure-devops azure-pipelines