Search code examples
azureazure-devopsazure-pipelinesbuild-pipeline

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


The second build pipeline should be dependable on first build pipeline and the work item should relate to the build pipeline for keeping track.


Solution

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

    There is an option Build Completion under Triggers in your build definition:

    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.

    So, we could use this option to set up dependencies.

    And there is another option Automatically link new work in this build under Options in your build definition, which could use to track the related workitems.

    As test, I created a pipeline nullTest which depend on nullTest2:

    enter image description here

    And enable the option Automatically link new work in this build for those two pipelines, after the completion of the construction pipeline nullTest2, the nulltest pipeline is triggered:

    enter image description here

    Update:

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

    Associate the workitem to the pipeline, you just need add associate the workitems when you submit the changes:

    enter image description here

    Hope this helps.