Bash Azure上载批处理返回空数组

Bash Azure上载批处理返回空数组,bash,azure-devops,azure-pipelines,Bash,Azure Devops,Azure Pipelines,我有一个自动化管道,需要以git hub中的特定文件夹为目标,运行一些sed命令,完成后,将所有内容推送到azure blob存储 下面是我的yaml文件的样子 yaml template. parameters: client_email: '' url_deployment: '' storage_account: '' working_dir: '' - task: AzureCLI@2 inputs: AzureSubscription: 'my-a

我有一个自动化管道,需要以git hub中的特定文件夹为目标,运行一些
sed
命令,完成后,将所有内容推送到azure blob存储

下面是我的yaml文件的样子

yaml template.
parameters:
  client_email: ''
  url_deployment: ''
  storage_account: ''
  working_dir: ''

- task: AzureCLI@2
    inputs:
      AzureSubscription: 'my-azure-resource-manager'
      scriptType: bash
      scriptLocation: inlineScript
      inlineScript: |
        source='${{ parameters.working_dir }}'
        echo "SOURCE: "$source
        az storage blob upload-batch --source '${{ parameters.working_dir }}' --destination '$web/' --account-name ${{ parameters.storage_account }} --pattern '[!dist&&!.git&&!.idea&&!client_pipeline.yaml&&!client_template.yaml&&!README.md]*'

在我的实际管道中,我将所有变量设置如下:

variables:
  - name: storage_account
    value: <my-storage-account
  - name: client_email
    value: <my-email>
  - name: url_deployment
    value: <url-deployment>
  - name: working_dir
    value: <my-github-working-dir>

steps:
  - template: client_template.yaml
    parameters:
      client_email: ${{ variables.client_email }}
      url_deployment: ${{ variables.url_deployment }}
      storage_account: ${{ variables.storage_account }}
      working_dir: ${{ variables.working_dir }}


警告一直都在发生,但我能够毫无问题地将我的repo文件夹推送到我的存储中,这是在我重构代码以便能够重用模板时开始发生的。

我遇到了这个问题。该问题与
--source
有关,由于某种原因,它只接受
如果我传递变量或文件夹名称,它将停止工作。在我的情况下,我只想上传
工作目录
,而忽略其他所有内容。我尝试使用
--pattern
,但我不知道如何明确地将其设置为仅针对工作目录。请尝试在本地计算机中运行推荐行,并检查此问题是否仍然存在?如果可能,请尝试使用真实的源目录而不是参数重试。
WARNING: There are no credentials provided in your command and environment, we will query for the account key inside your storage account. 
Please provide --connection-string, --account-key or --sas-token as credentials, or use `--auth-mode login` if you have required RBAC roles in your command. For more information about RBAC roles in storage, visit https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad-rbac-cli. 
Setting the corresponding environment variables can avoid inputting credentials in your command. Please use --help to get more information.

[]