AzureDevops 发布 - 命令 Shell "do not have permissions"

AzureDevops Release - Command Shell "do not have permissions"

我使用命令行任务在 Azuredevops 上创建了一个版本。 该脚本非常简单: 解压缩 artifcats 并将其移动到另一个文件夹。

但是代理部署和存储库之间的所有者文件夹不同。 我添加了 chmod 777,它可以工作,但不是最佳答案。

你有其他解决方案吗?

AzureDevops Release - Command Shell “do not have permissions”

确实,要解压缩 artifcats 并将其移动到另一个文件夹,我们可以使用提取文件任务来完成此操作:

Extract Files task

Use this task in a build or release pipeline to extract files from archives to a target folder using match patterns. A range of standard archive formats is supported, including .zip, .jar, .war, .ear, .tar, .7z, and more.

顺便说一句,有一个解压缩目录的扩展 Zip and unzip directory build task

希望对您有所帮助。