Search code examples
azureazure-devopsazure-storageazure-blob-storage

Azure CLI throwing OutOfRangeInput error while uploading build artifact to the blob storage in the release pipeline


I am trying to deploy a static webpage with Azure DevOps and Azure Blob storage. From the release pipeline, I am trying to upload the build artifact with Azure CLI. But it is throwing OutOfRangeInput error.

az storage blob upload-batch --account-name 'accountname' --account-key 'accountkey' --destination ‘$web’ --source './web'

I have a small storage-account name and with lowercase letters.

enter image description here


Solution

  • I think Azure DevOps should make some clear documentation on how the tasks differentiation exists among AzureCLI@0 vs AzureCLI@1 vs AzureCLI@2. So that anyone facing this kind of problem can understand what is their requirement and which task version he/she should use.

    The solution was to change the task version, and it worked out of the box. Just downgraded the task version from AzureCLI@2 to AzureCLI@1. Other than that please keep in mind the @Bright Ran-MSFT's answer first. change task version