我有一个多阶段发布管道,它有大约 15 个阶段用于不同的环境。如果我对一个阶段中的其中一个步骤进行了更改,我必须手动将其复制到每个阶段。有没有一种方法可以选择多个阶段并进行更改?
最佳答案
您可以为此使用任务组:
A task group allows you to encapsulate a sequence of tasks, already defined in a build or a release pipeline, into a single reusable task that can be added to a build or release pipeline, just like any other task. You can choose to extract the parameters from the encapsulated tasks as configuration variables, and abstract the rest of the task information.
这将允许您创建一个模板并对其进行修改,并且它会在使用它的任何地方进行修改。
https://learn.microsoft.com/en-us/azure/devops/pipelines/library/task-groups?view=azure-devops
关于azure-devops - 在 Azure Devops 中复制发布管道所有阶段的更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59529307/