我正在尝试部署简单的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'发布于 2020-04-07 20:46:38
从我上面看到的,你有错误的任务类型,它找不到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的?我找不到这个。
https://stackoverflow.com/questions/61078803
复制相似问题