I have an Azure DevOps Release who in one of its tasks have to copy files from Azure Repo to Blob Storage. I use Azure file copy task and it works perfectly if blob storage is in the same Azure subscription who is included to Azure DevOps. But in one of the stages I have to deploy to a different Azure subscription and in this scenario, the task fails and I get an error without information:
2019-02-25T07:50:33.9773339Z ##[error]Upload to container: 'containerName' in storage account: 'storageAccountName' with blob prefix: '' failed with error: '' For more info please refer to https://aka.ms/azurefilecopyreadme
I think is because of permissions, but I don't know how to configure.
Any idea?
But in one of the stages I have to deploy to a different Azure subscription and in this scenario.
If you want to copy the file to Azure storage in a different Azure subscription, you need to creat an Azure service connection string. Then you could choose the corresponding subscription from Azure Subscription dropdown list.
For detail steps how to create an Azure Resource Manager service connection, please refer to the official document.
Note: Don't forget to assign role to the service principal.