Azure Devops部署:解析时任务失败,出现以下错误:JSON输入意外结束

时间:2019-08-17 19:46:31

标签: azure azure-devops

我尝试使用Azure DevOps Pipeline(CI / CD)从GitHub部署ARM模板。我已经创建了一个空白的参数文件,因为我暂时不使用它,但是当我单击部署按钮时,出现以下错误。

Error: Ensure the Parameters file ( 'd:\a\r1\a\Github drops\azuredeploy.parameters.json' ) is valid. Task failed while parsing with following error: Unexpected end of JSON input

这是parameters.json的内容

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": { 
    },
    "resources": [ ]
}

1 个答案:

答案 0 :(得分:0)

参数文件必须采用以下格式:

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
     "storageAccountType": {
         "value": "Standard_GRS"
     }
  }
}

阅读:https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-deploy#parameter-files

相关问题