2

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

Siddhi Kamat
  • 135
  • 2
  • 11

1 Answers1

4

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.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
  • I tried integrated in build to associate the work item. But only a specific build number gets added into the work item details. How do you I associate a work item completely wit build so that each time I run the build, it is displayed in the development section of work item. I enabled the automatically link work item, but still I don't get the related work item after running the build. Could you give me a step wise procedure how to associate the work item? – Siddhi Kamat Jun 04 '20 at 06:16
  • @SiddhiDilipKamat, I have updated my answer, please check if it helps you. – Leo Liu Jun 04 '20 at 06:39
  • @ Leo Liu-MSFT Thanks for your response. This only works when commits are done from the remote repository and not local repository. Could you please clarify this for me? – Siddhi Kamat Jun 04 '20 at 07:16
  • @SiddhiDilipKamat, you mean from Visual Studio? If yes, I will check. – Leo Liu Jun 04 '20 at 07:21
  • 1
    @SiddhiDilipKamat, I test it with Visual Studio, it also works fine. – Leo Liu Jun 04 '20 at 07:30
  • Yes, I mean Visual studio community edition. I tried but it doesn't work. Could you suggest something? – Siddhi Kamat Jun 04 '20 at 08:05
  • @SiddhiDilipKamat, I am using the Visual Studio **Professional 2019**, seems to be a problem with the VS version, do you have other versions of VS to test? I don’t have a community version at this moment, and testing it will take some time to install it – Leo Liu Jun 04 '20 at 08:13
  • @SiddhiDilipKamat, Also test it with Visual studio community 2019, it works fine. Try to update your VS to 2019 and test. – Leo Liu Jun 04 '20 at 08:41
  • @Leu When I commit the changes from the local repo and push it onto devops for the first time with new project. How should I link the commit to work item? or How can I associate a new build with commit from local repo to work item. Sorry for delay in reponse. Thanks – Siddhi Kamat Jun 05 '20 at 11:37