I'm using a window based agent in Azure Pipeline. One of the task is to copy over an artifact to an Azure Blob Storage.
- task: AzureFileCopy@3
displayName: 'Upload to Azure'
inputs:
sourcePath: '$(Pipeline.Workspace)/dist'
azureSubscription: 'My Subscription'
destination: 'AzureBlob'
storage: $(featureStorageName)
containerName: '$web'
Microsoft suggest to use az storage blob with task: AzureCLI@2
This task is written in PowerShell and thus works only when run on Windows agents. If your pipelines require Linux agents and need to copy files to an Azure Storage Account, consider running az storage blob commands in the Azure CLI task as an alternative.
Question
What would be the equivalent command that I can run on a Linux agent?
I think the skeleton would start like:
task: AzureCLI@2
inputs:
azureSubscription: 'My Subscription'
scriptType: 'pscore'
scriptLocation: 'inlineScript'
inlineScript: |
az ...