简体   繁体   English

Azure DevOps 增量管道

[英]Azure DevOps Incremental pipeline

I have 2 components in my project and have 2 different build and release pipelines.我的项目中有 2 个组件,并且有 2 个不同的构建和发布管道。 For both of them am mentioning different paths for build and publish.对于他们两个,我都提到了构建和发布的不同路径。 In the release pipeline task "Create or Update Azure Resources" both are having same linked and main templates.在发布管道任务“创建或更新 Azure 资源”中,两者都具有相同的链接模板和主模板。 But here the problem is if i deploy the second component then all the configurations and code in the first component is getting removed... Now i can see only second component configurations.但这里的问题是,如果我部署第二个组件,那么第一个组件中的所有配置和代码都会被删除......现在我只能看到第二个组件配置。 I have selected deployment mode as incremental both in the pipeline and templates as well.我在管道和模板中都选择了增量部署模式。

Since not sure what does your template.json/template.parameter.json file and your task configuration looks like, I just share my configuration for you refer.由于不确定你的template.json/template.parameter.json文件和你的任务配置是什么样的,我只是分享我的配置供你参考。

In the Azure resource group deployment task, you can use Override template parameters to override the parameter value and this override only affect the current job:Azure resource group deployment任务中,您可以使用Override 模板参数来覆盖参数值,此覆盖仅影响当前作业:

在此处输入图片说明

At first deploy, I am using the name MerlinAngular.第一次部署时,我使用名称 MerlinAngular。 In the second deploy, the webappname and serviceplan name is Change-Merlin.在第二个部署中,webappname 和 serviceplan 名称是 Change-Merlin。 You can see the second one result does not replace and override the first one.您可以看到第二个结果不会替换和覆盖第一个结果。

What I am using is template.parameter.json file,我使用的是template.parameter.json文件,

在此处输入图片说明

then use the Override template parameters option to achieve incremental deploy.然后使用覆盖模板参数选项来实现增量部署。

在此处输入图片说明

You can try with this way.你可以用这种方法试试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM