本文介绍了开发和发布以及修补程序分支的Azure DevOps分支/管道设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在为开发和发布工作设置项目时遇到了困难.我已经阅读了许多文章,但是无法就如何设置我的开发人员以及为不同分支机构发布管道的问题得出明确的结论.我需要这方面的帮助.

I am having difficulty in setting up my project for dev and release work. I have gone through various articles but I am unable to come to a definitive conclusion about how to setup up my dev and release pipelines for different branches. I need help in this area.

作为一个例子,假设我在/azure-pipelines.yml中有一个带有管道DevPipeline的Dev分支.该管道具有CI触发器,如下所示:

As an example, say I have a Dev branch with a pipeline DevPipeline in /azure-pipelines.yml.This pipeline has CI triggers like so:

trigger:

Dev
features/*
  1. 现在,当我创建分支Release/R1.0时,我到底需要做什么?
  2. 我是否创建一个新的管道,例如Release-R1.0.该管道的.yml应该在哪里?
  3. 应该覆盖/azure-pipelines.yml还是创建/Release-R1.0.yml?

  1. Now, when I create a branch Release/R1.0 what exactly do I need to do?
  2. Do I create a new pipeline say Release-R1.0. Where should the .yml for this pipeline be?
  3. Should it overwrite /azure-pipelines.yml or should I create /Release-R1.0.yml?

如果开发人员想要针对R1.0进行修订/修复,是否应该在hotfix/R1.0分支下进行工作?在这种情况下,我必须在R1.0 yaml中相应地调整触发器吗?

If developers want to work on a fix/hotfix for R1.0, should they work under hotfix/R1.0 branch? In this case, I would have to adjust my triggers accordingly in the R1.0 yaml?

我们非常感谢您的帮助.

Any help is really appreciated.

谢谢

推荐答案

  1. 现在,当我创建分支Release/R1.0时,我到底需要做什么?
  2. 我是否创建一个新的管道,例如Release-R1.0.该管道的.yml应该在哪里?

这取决于您新创建的管道与Dev分支上的管道是否具有相同的内部版本.如果是,则只需在azure-pipelines.yml中添加一个触发器Release/R1.0:

It depends on whether your new created pipeline has the same build as the pipeline on the Dev branch. If yes, you can just add one more trigger Release/R1.0 in the azure-pipelines.yml:

trigger:

Dev
features/*
Release/R1.0

如果它们没有相同的管道,或者您不想为分支Release/R1.0使用相同的管道,则需要创建一个新管道,例如Release-R1.0.并且应将此管道的 .yml设置为 ,位于Release文件夹下R1.0分支中的yaml文件中.检查我以前的线程详细信息.

If they do not have the same pipeline, or you do not want use the same pipeline for the branch Release/R1.0, you need to create a new pipeline say Release-R1.0. And the .yml for this pipeline should be set the yaml file in R1.0 branch under the Release folder. Check my previous thread for some details.

由于它们具有不同的触发器或不同的构建任务,因此不应覆盖/azure-pipelines.yml,因此您需要创建一个新的/Release-R1.0.yml.

Since they have different triggers or different build tasks, it should not overwrite /azure-pipelines.yml, you need create a new /Release-R1.0.yml.

如果我理解的正确,如果您想为R1.0进行修补,最好在R1.0的基础上创建分支Release/hotfix-R1.0,在R1.0 yaml中,您可以设置触发条件:

If I understand you correct, if you want to work on a hotfix for R1.0, it is better to create a branch Release/hotfix-R1.0 based on the R1.0, and in the R1.0 yaml, you could set the triggers:

trigger:
Release/*

因此,您不必在R1.0 yaml中相应地调整我的触发器.

So, you do not have to adjust my triggers accordingly in the R1.0 yaml.

希望这会有所帮助.

这篇关于开发和发布以及修补程序分支的Azure DevOps分支/管道设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 12:21