【问题标题】:How to copy files from azure Devops to Azure file share storage account如何将文件从 azure Devops 复制到 Azure 文件共享存储帐户
【发布时间】:2022-11-11 18:09:23
【问题描述】:

我有一个构建管道,它构建 *.p12 文件并在构建管道中发布了一个工件

如何将文件从 azure Devops 管道工作区或从已发布的工件复制到 Azure 存储帐户(文件共享)路径

【问题讨论】:

标签: azure-devops azure-pipelines azure-storage azure-storage-account fileshare


【解决方案1】:

您可以在 Azure 管道中 Azure file copy task 将文件从 Azure 管道复制到 azure 存储帐户。此任务仅在 Windows 代理上运行时有效。

【讨论】:

  • 这只能上传到 blob ,正在寻找上传到文件共享位置,但是“az storage file upload” az cli 工作
【解决方案2】:

“az storage file upload” az cli 命令用于将文件从 azure Devops 管道工作区上传到文件共享存储帐户

【讨论】:

  • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
【解决方案3】:

Az storage file upload 是你们都在寻找的。批量上传可以用来做文件而不是目录。尽管网站说连接字符串和共享名称的组合也可以使用。

由于我花了一段时间才找到它,这里是获取连接字符串然后稍后重用它的命令:

connectionString=$(az storage account show-connection-string -g **name of your resource group** -n **name of storage account** --query connectionString -o tsv )

【讨论】:

    猜你喜欢
    • 2021-02-22
    • 2021-03-09
    • 2021-06-08
    • 2017-04-11
    • 2021-04-30
    • 2020-08-25
    • 2021-10-03
    • 2022-01-07
    • 2020-08-21
    相关资源
    最近更新 更多