VSTS ARM的管道部署错误:找不到与模板文件模式匹配的文件 [英] VSTS Pipeline Deployment of ARM Error: Could not find any file matching the template file pattern

查看:80
本文介绍了VSTS ARM的管道部署错误:找不到与模板文件模式匹配的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在VSTS管道中部署Azure ARM脚本.

I am trying to deploy an Azure ARM script in VSTS Pipeline.

我在构建步骤中发布了工件,并在发布步骤中下载了工件.该日志似乎表明它找到了ARM脚本(经过反复试验.经过规定的方式找到了

I "Published" the Artifacts in the Build Step and Downloaded the Artifacts in the Release Step. The Log seems to indicate that it found the ARM script (After much trial and error. The prescribed manner found here does not seem to work at all).

但是我得到错误:找不到与模板文件模式匹配的任何文件

顺便说一句,即使找不到文件,我也会收到此错误(这很有意义..但实际上找不到文件时却没有).当我在Azure门户中手动部署时,ARM脚本会正确部署.

Incidentally, I get this error even if can't find the file (which makes sense..but not when it actually does find the file). The ARM script deploys correctly when I deploy manually in Azure Portal.

我正在发布管道中使用 Azure资源组部署步骤.

I am using the Azure Resource Group Deployment step in the release pipeline.

我不确定还有哪些其他信息可以帮助您解决此问题,但是请提出要求,希望我能将其提供给您.

I'm not sure what other information might help troubleshoot this, but request and hopefully I can get it to you.

谢谢

2018-12-14T18:32:06.6009951Z ##[section]Starting: Azure Deployment:Create Or Update Resource Group action on ChrisGroup
2018-12-14T18:32:06.6015952Z 

==============================================================================
2018-12-14T18:32:06.6016124Z Task         : Azure Resource Group 
Deployment
2018-12-14T18:32:06.6016287Z Description  : Deploy an Azure resource manager (ARM) template to a resource group. You can also start, stop, delete, deallocate all Virtual Machines (VM) in a resource group
2018-12-14T18:32:06.6016444Z Version      : 2.141.4
2018-12-14T18:32:06.6016526Z Author       : Microsoft Corporation
2018-12-14T18:32:06.6016655Z Help         : [More Information] (https://aka.ms/argtaskreadme)
2018-12-14T18:32:06.6016801Z 
==============================================================================
2018-12-14T18:32:06.9610677Z Checking if the following resource group exists: ChrisGroup.
2018-12-14T18:32:07.2734470Z Resource group exists: true.
2018-12-14T18:32:07.2736899Z Creating deployment parameters.
2018-12-14T18:32:07.2809876Z The detected encoding for file 'D:\a\r1\a\IAC\ARM.json' is 'utf-8'
2018-12-14T18:32:07.3021166Z ##[error]Error: Could not find any file matching the template file pattern
2018-12-14T18:32:07.3030720Z ##[section]Finishing: Azure Deployment:Create Or Update Resource Group action on ChrisGroup

根据请求:

在模板参数"字段中 -dailyreports_name'$(IACWeb)'-dailyreportsapi_name'$(IACAPI)'

In the Template Parameters field I put -dailyreports_name '$(IACWeb)' -dailyreportsapi_name '$(IACAPI)'

和OMG ...应该是变量文件的路径. UGH

and OMG... It's supposed to be a path to a variables file. UGH

一旦我输入了替代模板参数",它就会起作用.

Once I put into the Override Template Parameters, it works.

Microsoft应该可能将标签改写为模板参数文件"

Microsoft should probable reword the label to "Template Parameters File"

推荐答案

您需要将传入的参数放入替代模板参数"中. 模板参数"字段实际上是对文件位置的引用.

You need to put the parameters being passed in into the "Override template parameters". The "Template parameters" field is actually a reference to a file location.

这篇关于VSTS ARM的管道部署错误:找不到与模板文件模式匹配的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆