3
votes

Let's say I have 2 separate repo's: RepoFrontEnd and RepoBackEnd. When RepoFrontEnd changes (and gets built) then another BackEndRepo needs to be rebuilt. How can I set up such a trigger?

2
Does RepoFrontEnd build update the code in RepoBackEnd repository? What's the detail workflow?starian chen-MSFT
Here's what I'm trying to achieve - stackoverflow.com/questions/43283797/…. So, now I have to figure out how to trigger a build of RepoBackEnd (Core-P in the mentioned question) when RepoFrontEnd is built. So, this is a chained 2 repo's build process.alvipeo

2 Answers

2
votes

This is actually done with the Trigger Build Task, you can find it in the VSTS Marketplace.

What it does is it enables the chaining of builds. And this is exactly what I needed. So, with this task in place for RepoFrontEnd, when its build is completed, it triggers the RepoBackEnd build.

0
votes

You can use Web Hooks and use Code pushed event to trigger sending information to a URL (such as a website you developed), after receive the information you can send queue a build by REST API. Detail steps as:

  1. Develop a website with the functions of receiving information and queuing a build for BackEndRepo after receiving information.
  2. Create a web hook for the project contains RepoFrontEnd repo. In Service Hooks tab (https://account.visualstudio.com/project/_apps/hub/ms.vss-servicehooks-web.manageServiceHooks-project) -> Create subscription -> Web Hooks -> Next -> select Code pushed for Tigger on this type of event -> select RepoFrontEnd for repository -> Next -> set the URL as the website receiving information URL -> Test ( check if it works good) -> Finish.
  3. Enable CI build for RepoFrontEnd build definition.

Now any changes are pushed to RepoFrontEnd, builds for RepoFrontEnd and BackEndRepo will be triggered.