I'm using the azure cli in my tfs release pipeline to upload the artifacts of the preceeding build pipeline to an azure blob storage.
The used script is like follows:
az storage blob upload-batch --account-key $(Storage.Key) --account-name $(Storage.AccountName) -d $(Storage.Container)/$(Storage.SubFolder) -s $(System.DefaultWorkingDirectory)/myartefact/dist
The file upload works fine. But after having finished it obviously tries to perform an account clear
command which fails:
2020-06-15T11:28:57.2682530Z Finished[#############################################################] 100.0000%
2020-06-15T11:28:57.4557138Z [command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" account clear"
2020-06-15T11:28:59.7995176Z ##[error]Script failed with error: Error: D:\w_temp\azureclitaskscript1592220526658.bat failed with return code: 0
2020-06-15T11:28:59.7995176Z ##[section]Finishing: Copy Files to Blob Storage
I don't know why this command is executed and I don't know why it fails. Any ideas?