Azure 资源组部署失败

Azure Resource Group Deployment is failing

我的发布管道在任务 AzureResourceGroupDeployment@2 上失败并出现错误:

Error: Could not find any file matching the template file pattern

这是yaml代码:

       steps:

      - download: build
        #artifact: function, arm

      - task: AzureResourceGroupDeployment@2
        displayName: 'Perform Resource Deployment'
        inputs:
          azureSubscription: $(qaSubscription)
          action: 'Create Or Update Resource Group'
          resourceGroupName: $(resourceGroup)
          location: $(location)
          templateLocation: 'Linked artifact'
          csmFile: '$(Pipeline.Workspace)/arm/azuredeploy.json'
          csmParametersFile: '$(Pipeline.Workspace)/arm/azuredeploy.parameters.json'
          deploymentMode: 'Incremental'

我不明白这里可能出了什么问题...

想通了。我需要在路径中添加“build/”:

csmFile: '$(Pipeline.Workspace)/build/arm/azuredeploy.json'