Azure管道策略: Do I have to create one pipeline for pre-merging pull request code?或重用

标签 azure .net-core azure-devops devops

我正在开发一个解决方案,该解决方案具有执行以下操作的 yaml 构建管道

>restore
>build
>test
>publish test
>publish test coverage
>publish source code

我想在一个分支中实现一个执行以下操作的策略:每当开发人员向 develop 分支创建拉取请求时,该操作就会触发构建以确保开发人员正在尝试的代码合并以开发构建并通过所有测试

我的问题是:作为最佳实践,我应该重用已有的构建管道,还是应该为该特定作业创建一个新管道?

最佳答案

嗨罗德里戈,只要您没有某些特定要求,您就可以使用相同的管道。您可以利用管道 yaml 中的条件或阶段来使其具有强大的重用性。

了解更多信息

https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema

关于Azure管道策略: Do I have to create one pipeline for pre-merging pull request code?或重用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63056025/

相关文章:

entity-framework - EF6 实体数据模型设计器不适用于目标框架 .net 5.0

android - 在 Azure DevOps 中共享版本信息

node.js - 有没有办法为 VSTS CI npm 任务提供环境变量?

c# - 在 Azure Pipeline 中使用 GlobalSuppressions.cs i StyleCop Runner

linux - curl : (7) Failed connect to 127. 0.0.1:5984;连接被拒绝[有时]

azure - Docker:启动用户层代理时出错:绑定(bind) 0.0.0.0:50000:意外错误 Azure VM 上的权限被拒绝

c# - AzureServiceTokenProvider异常: Tried to get token using Managed Service Identity.发送请求时发生错误

azure - 自动化帐户重新运行,作业时间表已存在

.net - 如何从使用 EPPlus.core 创建的 Excel MemoryStream 生成 PDF?

c# - Docker 在 VS 中运行,但在发布到 AWS 时出错?错误 CS5001 : Program does not contain a static 'Main' method suitable for an entry point