2016-07-14

TFS Build Triggers

The Problem

My solution contains both WebApi and UI (AngularJS app) project.
I would like to have two build definitions:

  • Api build -  Build web.api project, run unit tests, deploy on Azure
  • UI build - Run NPM, Grunt, and deploy on different Azure website 
I would like to build/deploy projects only when I push changes to particular project, so when I push changes to UI only UI build schould be triggered.


Preparation

I already manage to build and deploy both projects separatly. The only thing I need to do is configure build triggers.

Project structure

My project structure in silution is:

Where:
Furcas.Api is Web.Api priject
Furcas.Cli is Web project (AngularJs app)
Furcas.Engine is bussiness logic for web.api

If your VSTS project supports GIT as version control system


WebApi build definition
Note that build will be triggered if changes were made in Furcas.Api or Furcas.Engine project
Things to remember: Path should start with /



UI build definition:

If your VSTS project supports Team Foundation as version control system

(You pinked: 

)

VSTS provides picker for TFS paths