Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTS Filter by repository folder?

I'm using Visual Studio Team Services to build my project which is stored in GitHub (here). The master branch contains multiple projects which make up the solution. Amongst those are a WebAPI project and a Cordova project. I need to build those using two separate build definitions in VSTS.

Previously I had set-up my build definition and used the branch filters to filter on what had been pushed to the repo. For instance:

master/src/API

This worked, but it doesn't any more. It seems as if the underlying code has changed. A filter of 'master' still works and I understand how this feature is probably meant to filter specifically on branches and maybe not on folders within the branch?

It's not a huge problem, but at this time all of my builds will trigger with every check-in, even if nothing changed in the meantime for that source code. So I'm not wondering what a good solution for this issue would be:

  1. Put every project in it's own branch. Seems like a workaround
  2. Some other filter option or maybe another syntax or something?
  3. Leave it as it and don't worry about the extra builds (but that itches, you know...)

Anyone running a similar set-up?

like image 685
Jasper Avatar asked Feb 16 '26 04:02

Jasper


1 Answers

Path filters is not supported for VSTS GitHub CI Build, it is available for Git CI Build on VSTS. You can vote this user voice: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/15140571-enable-continuous-integration-path-filters-for-git

The workaround is as you said that put every project in its own branch.

like image 133
starian chen-MSFT Avatar answered Feb 17 '26 18:02

starian chen-MSFT



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!