Hello,
I'm using the following azure-pipelines.yml-configuration to attempt to copy files located inside a GitHub repository to a blob inside an Azure storage account using Azure DevOps Pipelines remote agents.
The current configuration is as follows:
trigger:
- master
pool:
vmImage: 'windows-2019'
steps:
- task: AzureFileCopy@2
inputs:
sourcePath: '$(Build.Repository.LocalPath)\\sqlBackup'
azureSubscription: 'heatbeat-devops - Service Endpoint'
resourceGroup: heatbeat-devops-development-reset
destination: azureBlob
storage: heatbeatdevopsdevdbreset
containerName: resetscripts
I'll receive the following warning in the pre-job step:
##[section]Starting: AzureFileCopy
==============================================================================
Task : Azure File Copy
Description : Copy files to Azure blob or VM(s)
Version : 2.1.5
Author : Microsoft Corporation
Help : [More Information](https://aka.ms/azurefilecopyreadme)
==============================================================================
##[warning]Can\'t find loc string for key: StorageAccountDoesNotExist
Unable to fetch storage account key. Error: '{0}' Error: StorageAccountDoesNotExist heatbeatdevopsdevdbreset
at StorageAccounts.<anonymous> (d:\a\_tasks\AzureFileCopy_eb72cb01-a7e5-427b-a8a1-1b31ccac8a43\2.1.5\node_modules\azure-arm-rest\azure-arm-storage.js:164:23)
at next (native)
at fulfilled (d:\a\_tasks\AzureFileCopy_eb72cb01-a7e5-427b-a8a1-1b31ccac8a43\2.1.5\node_modules\azure-arm-rest\azure-arm-storage.js:4:58)
at process._tickCallback (internal/process/next_tick.js:109:7)
##[section]Finishing: AzureFileCopy
and the following error inside the job itself:
##[section]Starting: AzureFileCopy
==============================================================================
Task : Azure File Copy
Description : Copy files to Azure blob or VM(s)
Version : 2.1.5
Author : Microsoft Corporation
Help : [More Information](https://aka.ms/azurefilecopyreadme)
==============================================================================
##[command]Import-Module -Name C:\Program Files\WindowsPowerShell\Modules\AzureRM\2.1.0\AzureRM.psd1 -Global
##[warning]The names of some imported commands from the module 'AzureRM.Websites' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.
##[command]Import-Module -Name C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\2.1.0\AzureRM.Profile.psm1 -Global
##[command]Add-AzureRMAccount -ServicePrincipal -Tenant *** -Credential System.Management.Automation.PSCredential -EnvironmentName AzureCloud @processScope
##[command] Select-AzureRMSubscription -SubscriptionId *** -TenantId ***
##[error]Storage account: heatbeatdevopsdevdbreset not found. The selected service connection 'Service Principal' supports storage accounts of Azure Resource Manager type only.
##[section]Finishing: AzureFileCopy
##[error]Storage account: heatbeatdevopsdevdbreset not found. The selected service connection 'Service Principal' supports storage accounts of Azure Resource Manager type only.
Looking at the official documentation for this task ( https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-file-copy?view=azure-devops#yaml-snippet ), all required parameters should be filled out correctly.
With the help of a chat support agent, I was able to confirm, that the storage account ín question (
heatbeatdevopsdevdbreset ) is an ARM-deployed storage account and not a classic storage account which referred me to this forum.
If you additional information is required, let me know. Any help on this matter would be appreciated!