我在Visual Studio 2019中有一个Azure资源组部署项目,该项目可以从Visual Studio进行验证并很好地进行部署,但是当我尝试使用Azure资源组部署任务通过Azure发布管道进行部署时,它会间歇性地 >失败并显示错误:
请求内容无效,无法反序列化: 在JSON中找不到“必需的属性”类型”。路径 “ properties.template.resources [6]”,第1行,位置3759。”。任务 创建或更新模板部署时失败。
在我对该问题的研究中,我一直找不到任何有用的信息。 这是模板:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sql_name": {
"defaultValue": "project-sql",
"type": "String"
},
"name": {
"defaultValue": "a-data-factory",
"type": "String"
},
"location": {
"defaultValue": "Central US",
"type": "String"
},
"apiVersion": {
"defaultValue": "2018-06-01",
"type": "String"
},
"gitAccountName": {
"type": "String"
},
"gitRepositoryName": {
"type": "String"
},
"gitBranchName": {
"defaultValue": "foo-branch",
"type": "String"
},
"gitRootFolder": {
"defaultValue": "/",
"type": "String"
},
"gitProjectName": {
"type": "String"
},
"ssisdbname": {
"type": "String",
"defaultValue": "SSISDB"
},
"factoryName": {
"type": "string",
"metadata": "Data Factory Name",
"defaultValue": "a-data-factory"
}
},
"variables": {
"factoryId": "[concat('Microsoft.DataFactory/factories/', parameters('factoryName'))]"
},
"resources": [
{
"type": "Microsoft.Sql/servers",
"apiVersion": "2015-05-01-preview",
"name": "[parameters('sql_name')]",
"location": "northcentralus",
"kind": "v12.0",
"properties": {
"administratorLogin": "theadmin",
"administratorLoginPassword": "",
"version": "12.0"
}
},
{
"type": "Microsoft.Sql/servers/databases",
"apiVersion": "2017-03-01-preview",
"name": "[concat(parameters('sql_name'), '/dummyDB')]",
"location": "northcentralus",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('sql_name'))]"
],
"sku": {
"name": "S0",
"tier": "Standard"
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"zoneRedundant": false
}
},
{
"type": "Microsoft.Sql/servers/databases",
"apiVersion": "2017-03-01-preview",
"name": "[concat(parameters('sql_name'), '/dummerDB')]",
"location": "northcentralus",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('sql_name'))]"
],
"sku": {
"name": "S0",
"tier": "Standard"
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"zoneRedundant": false
}
},
{
"type": "Microsoft.Sql/servers/encryptionProtector",
"apiVersion": "2015-05-01-preview",
"name": "[concat(parameters('sql_name'), '/current')]",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('sql_name'))]"
],
"kind": "servicemanaged",
"properties": {
"serverKeyName": "ServiceManaged",
"serverKeyType": "ServiceManaged"
}
},
{
"type": "Microsoft.Sql/servers/firewallRules",
"apiVersion": "2015-05-01-preview",
"name": "[concat(parameters('sql_name'), '/AllowAllWindowsAzureIps')]",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('sql_name'))]"
],
"properties": {
"startIpAddress": "0.0.0.0",
"endIpAddress": "0.0.0.0"
}
},
{
"type": "Microsoft.DataFactory/factories",
"apiVersion": "[parameters('apiVersion')]",
"name": "[parameters('factoryName')]",
"location": "[parameters('location')]",
"identity": {
"type": "SystemAssigned"
},
"resources": [
{
"name": "[concat(parameters('factoryName'), '/theIntegrationRuntime1')]",
"type": "Microsoft.DataFactory/factories/integrationRuntimes",
"apiVersion": "2018-06-01",
"properties": {
"type": "Managed",
"typeProperties": {
"computeProperties": {
"location": "Central US",
"nodeSize": "Standard_D2_v3",
"numberOfNodes": 1,
"maxParallelExecutionsPerNode": 2
},
"ssisProperties": {
"catalogInfo": {
"catalogServerEndpoint": "project-sql.database.windows.net",
"catalogAdminUserName": "theadmin",
"catalogAdminPassword": {
"type": "SecureString",
"value": ""
},
"catalogPricingTier": "S0"
},
"edition": "Standard",
"licenseType": "LicenseIncluded"
}
}
},
"dependsOn": [ "[resourceId('Microsoft.DataFactory/factories', parameters('factoryname'))]" ]
}
],
"properties": {
"repoConfiguration": {
"type": "FactoryVSTSConfiguration",
"accountName": "[parameters('gitAccountName')]",
"repositoryName": "[parameters('gitRepositoryName')]",
"collaborationBranch": "[parameters('gitBranchName')]",
"rootFolder": "[parameters('gitRootFolder')]",
"projectName": "[parameters('gitProjectName')]"
}
},
"dependsOn": [ "[resourceId('Microsoft.Sql/servers', parameters('sql_name'))]" ]
}
]
}
答案 0 :(得分:0)
Release Pipeline指向的是带有格式错误模板的旧构建工件。