I have the following YAML configured but guessing I cannot use a storage account for a source input here? I assumed I could since the task simply uses azcopy (note: the command works fine from command line just not in the pipeline (i.e. permissions are set (e.g. SPN has been authorized and RBAC set).
Here's the code:
trigger:
- dev
pool:
vmImage: windows-latest
steps:
#Copy files to Azure Blob Storage
- task: AzureFileCopy@4
inputs:
sourcePath: 'https://someonesbackups.blob.core.windows.net/backups?mysastokengoeshere'
azureSubscription: MY-Production-Subscription
destination: azureBlob
storage: azcopypipelinetest
containerName: restored
additionalArgumentsForBlobCopy: --recursive=true
However, when that runs I get the following error:
"failed to perform copy command due to error: cannot start job due to error: cannot scan the path \\?\D:\a\1\s\https:\someonesbackups.blob.core.windows.net\backups?mysastokengoeshere=-REDACTED-, please verify that it is a valid."
Certainly seems as though you could do this but guessing I'm missing something fundamental here.
AzureFileCopy@4
task, and it seems to pass it directly to a utility function that uses it with theazcopy
command.AzCopy
, in turn, is supposed to support container to container copies, so you don't seem to be doing anything wrong from that perspective. The only thing I can't really see, because I can't verify the underlying source easily, is if theGet-VSTSInput
on that parameter is "sanitizing" it somehow??? – WaitingForGuacamole