AzureFileCopy 无法访问 Blob 存储

问题描述 投票:0回答:1

我正在使用 YAML 文件利用 AzureFIleCopy@4 将工件移动到 Blob 存储中。 我将存储帐户贡献者和存储 Blob 数据贡献者角色授予管道正在使用的服务连接。当它运行时,管道无法从存储帐户中识别容器名称,并且当它尝试创建新容器时,会发生错误。

- task: AzureFileCopy@4
            inputs:
              SourcePath: '$(System.ArtifactsDirectory)/files'
              azureSubscription: $(service_connection)
              Destination: 'AzureBlob'
              storage: ${storageAccount}
              ContainerName: ${containerName}
              CleanTargetBeforeCopy: false

##[debug][Azure Call]Getting container: [Containername] in storage account: [StorageAccount]
##[debug]Container: partner-test does not exist in storage account: [StorageAccount]
##[debug]Creating container if the containerName provided does not exist
##[debug][Azure Call]Creating container: [Containername] in storage account: [StorageAccount]
##[debug]Azure.RequestFailedException: This request is not authorized to perform this operation.

我尝试赋予不同的角色和不同的服务连接器,但它根本不起作用。你知道出了什么问题吗?

azure-devops copy
1个回答
0
投票

我认为这个“AzureFileCopy@4”任务只能帮助将文件从目标“复制”到存储帐户容器,它对创建存储帐户容器没有帮助。

因此“应预先准备现有存储帐户容器。”

© www.soinside.com 2019 - 2024. All rights reserved.