Freigeben über


VSTS Gems- Chain related builds

VSTS is a great platform, but did you know about its gems?

Follow this short post series where we undercover some of its coolest features.

Gem
Build dependency - Chain related builds together using build completion triggers

<click> on image for animation.

Area

Build

TFS Availability

TFS 2019

Value

  • Different configuration settings, options, or a different team to own the dependent process.
  • Easily Manage components that are dependent on each other but independently built
    (e.g. Automation tests and a Web service that both has 2 different repos owned by different teams)
  • Decouple long builds where each phase relevant to different users- that way, each stakeholder can be notified for early feedback without having to wait
    (e.g. developers interested in compilation and testing results and don't want to wait for a long static code analysis that can be examine later)

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.

Now you can trigger a build upon the successful completion of another build. Artifacts produced by an upstream build can be downloaded and used in the later build, and you can also get data from these variables: Build.TriggeredBy.BuildId, Build.TriggeredBy.DefinitionId, Build.TriggeredBy.BuildDefinitionName. See the build triggers documentation for more information.

This feature was prioritized based on what is currently the #2 highest voted suggestion with 1,129 votes.

Setup build chaining

 

Chain builds VS multi-phase build

Keep in mind that in some cases, a single multi-phase build could meet your needs. However, a build completion trigger is useful if your requirements include different configuration settings, options, or a different team to own the dependent process.

 

Find more gems on the Rangers blog

Find more gems on Twitter