如何在 Azure DevOps 中的 2 个构建管道和 link 构建管道的工作项之间创建依赖关系?

How to create dependencies between 2 build pipelines in Azure DevOps and link a work item to build pipeline?

第二个构建管道应该依赖于第一个构建管道,工作项应该与构建管道相关以保持跟踪。

How to create dependencies between 2 build pipelines in azure Devops and link a work item to build pipeline?

在您的构建定义中 Triggers 下有一个选项 Build Completion

Large products have several components that are dependent on each other. These components are often independently built. When an upstream component (a library, for example) changes, the downstream dependencies have to be rebuilt and revalidated. Teams typically manage these dependencies manually.

因此,我们可以使用此选项来设置依赖项。

并且在您的构建定义中的 选项 下还有另一个选项 Automatically link new work in this build,可用于跟踪相关的工作项。

作为测试,我创建了一个依赖于 nullTest2:

的管道 nullTest

并为这两条管道启用选项Automatically link new work in this build,在构建管道nullTest2完成后,触发nulltest管道:

更新:

Could you give me a step wise procedure how to associate the work item?

将工作项关联到管道,您只需在提交更改时添加关联工作项:

希望这对您有所帮助。