azure - 如何将文件从 Azure 存储文件共享复制到发布管道代理
问题描述
我想将 FileShare 中 Azure 文件存储中的文件下载到我的发布管道代理中。
在发布管道中,我使用 PowerShell 步骤并运行命令:
Start-AzStorageFileCopy -SrcShareName "report.xml" -SrcFilePath "." -DestFilePath "$(System.DefaultWorkingDirectory)" -DestShareName "report.xml" -Context $(context)
它现在问我一个参数-name
2020-05-09T01:43:34.1007773Z ##[error]Cannot process command because of one or more missing mandatory parameters: Name.
基本上我的计划是将此文件用于发布管道中的测试报告。因此,我需要在发布测试结果步骤中使用此文件。
解决方案
您正在寻找从发布代理作业本地下载文件,所以我会坚持使用下面的这个命令:
Get-AzStorageFileContent -Context $Context -ShareName "acishare" -Path "report.xml" -Destination $(System.DefaultWorkingDirectory)
推荐阅读
- node.js - 如何使用 flask 和 node.js 设置 HTTPS?
- php - PHP 不正确的变量声明
- selenium-webdriver - Jenkins 中为 TestNG 报告的实时测试
- c++ - 结构内的联合——如何指定初始化程序?
- ios - NSLayoutConstraint 没有成员“属性”
- apache-camel - 收到标头时如何完成聚合器中的所有待处理消息
- c# - 将 Unicode char Ids 字符串转换为 Unicode 文本 .NET
- powershell - powershell write-host 来自 get-content 列表的单个文件名
- php - 我的 PHP IPN 脚本不工作 - 是什么导致它失败?
- java - 将文件夹压缩成单独的部分(无需将所有部分一起提取)