我正在尝试部署简单的ARM,但是失败了。怎么了?
Git中的ARM文件位置是ARMTemplates / CreateSQLServerARM / azuredeploy.json
//Example
//https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-tutorial-
pipeline
//ERROR
ARM Service Conection deployment scope - Subscription
Checking if the following resource group exists: KensTestRG.
Resource group exists: true.
Creating deployment parameters.
##[error]Error: Could not find any file matching the template file pattern
Finishing: AzureResourceManagerTemplateDeployment
//YML
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: 'AzureRmPipeline-conn'
subscriptionId: '1111753a-501e-4e46-9aff-6120ed56333'
action: 'Create Or Update Resource Group'
resourceGroupName: 'KensTestRG'
location: 'North Europe'
templateLocation: 'Linked artifact'
csmFile: '\ARMTemplates\CreateSQLServerARM\azuredeploy.json'
deploymentMode: 'Incremental'
答案 0 :(得分:1)
从我上面看到的内容来看,您的任务类型错误,并且找不到AzureResourceManagerTemplateDeployment@3
。您可以使用AzureResourceGroupDeployment@2
吗?
下面是doc
中的用法示例- task: AzureResourceGroupDeployment@2
displayName: 'Deploy template'
inputs:
deploymentScope: 'Resource Group'
ConnectedServiceName: 'demo-deploy-sp'
subscriptionName: '01234567-89AB-CDEF-0123-4567890ABCDEF'
action: 'Create Or Update Resource Group'
resourceGroupName: 'demogroup'
location: 'Central US'
templateLocation: 'URL of the file'
csmFileLink: '$(artifactsLocation)WebSite.json$(artifactsLocationSasToken)'
csmParametersFileLink: '$(artifactsLocation)WebSite.parameters.json$(artifactsLocationSasToken)'
overrideParameters: '-_artifactsLocation $(artifactsLocation) -_artifactsLocationSasToken "$(artifactsLocationSasToken)"'
deploymentMode: 'Incremental'
您从哪里获得AzureResourceManagerTemplateDeployment @ 3?我找不到这个。