0
votes

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

2
Can you share the YAML you use in DevOps? - Charles Xu
Hi @SumitPaul, How are things going? Is the suggestion in my answer helpful to you? Please check with the suggestion. Any progress, feel free to tell me. - Bright Ran-MSFT

2 Answers

0
votes

Please check if the resource names, especially the Blob Name, contain any special characters.

If the resource names contain some special characters, percent-encode them using UTF-8 (preferred) or MBCS, then try the upload again.

Or you also can try to set a new name without any special characters.

To view more details, you can see "Naming and Referencing Containers, Blobs, and Metadata".

0
votes

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