我可以将构建工件的 URL 传递给链接的 ARM 模板部署吗?
can I pass the URL of build artifact to linked ARM template deployment?
我正在尝试为 linked 模板传递构建工件路径,但它抛出了以下错误。
InvalidContentLink: The provided content link
'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Data.Entities.Deployments.DeploymentTemplateContentLink'
is invalid or not supported. Content link must be an absolute URI not
referencing local host or UNC path.
详情:
我在文件夹清单中有构建工件。我有一个令牌替换任务来像这样替换清单中的文件 -> manifest/swagger.json。然后我有一个部署任务,它有一个主模板和 linked 模板。主模板我能够提供 link 例如 $(Pipeline.Workspace)/Manifest/Changes/master.json 在里面我有 linked 模板路径的参数和我正在传递 $(Pipeline.Workspace)/Manifest/Changes/Artifact/something.json.
这样的路径
linked 模板的 link 是否始终必须是 URL,就像存储帐户中的示例一样。如果是这样的话,现在我们的项目中不需要存储帐户,有没有其他方法可以实现?
更新:
虽然我是从参数传递它,但我直接提供示例以使上下文清晰。
{
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat('$(Pipeline.Workspace)/Manifest/Changes/linkedtemplates', '/initial.api.template.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"ServiceName": {
"value": "[parameters('ServiceName')]"
}
}
}
您不能使用管道工件,您需要一个可公开访问的 URL。这就是示例使用存储帐户的原因。
When referencing a linked template, the value of uri can't be a local file or a file that is only available on your local network. Azure Resource Manager must be able to access the template. Provide a URI value that downloadable as http or https.
我正在尝试为 linked 模板传递构建工件路径,但它抛出了以下错误。
InvalidContentLink: The provided content link 'Microsoft.WindowsAzure.ResourceStack.Frontdoor.Data.Entities.Deployments.DeploymentTemplateContentLink' is invalid or not supported. Content link must be an absolute URI not referencing local host or UNC path.
详情:
我在文件夹清单中有构建工件。我有一个令牌替换任务来像这样替换清单中的文件 -> manifest/swagger.json。然后我有一个部署任务,它有一个主模板和 linked 模板。主模板我能够提供 link 例如 $(Pipeline.Workspace)/Manifest/Changes/master.json 在里面我有 linked 模板路径的参数和我正在传递 $(Pipeline.Workspace)/Manifest/Changes/Artifact/something.json.
这样的路径linked 模板的 link 是否始终必须是 URL,就像存储帐户中的示例一样。如果是这样的话,现在我们的项目中不需要存储帐户,有没有其他方法可以实现?
更新: 虽然我是从参数传递它,但我直接提供示例以使上下文清晰。
{
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat('$(Pipeline.Workspace)/Manifest/Changes/linkedtemplates', '/initial.api.template.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"ServiceName": {
"value": "[parameters('ServiceName')]"
}
}
}
您不能使用管道工件,您需要一个可公开访问的 URL。这就是示例使用存储帐户的原因。
When referencing a linked template, the value of uri can't be a local file or a file that is only available on your local network. Azure Resource Manager must be able to access the template. Provide a URI value that downloadable as http or https.