1

I've recently set up an Azure DevOps Server 2019 on our local servers using TFVC for our source control. Our branch is structured as follows:

root
- App1
  - App1a
  - App1b
  - etc
- App2
- etc
- Utils

Our build scripts, test utilities, apps used during the build, etc are stored in Utils. What I want to do is only perform a build when changes occur anywhere in root except for Utils. I've seen the option to exclude paths in SO but it's only with GIT libraries, is this possible with TFVC?

The solution I'm using to work around this is from Triggering Azure DevOps builds based on changes to sub folders , but the build still executes, not the actual build mind you, but the pipeline which then triggers a notification to the team that it was successful. Ultimately I don't want it to run at all unless changes have been made outside of Utils. I also don't want to re-organize the folder structure either since a lot of our utilities have relative paths. I've got the trigger setup as Scheduled during the week at 1 am only when source or pipeline has changed Thanks in advance.

  • Hi friend, any update for this issue? Please check if **Shayki**'s answer helps to resolve this issue, you could consider [accepting it as answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) if it's helpful. And If the issue persists to block you,feel free to let us know. Just a reminder :) – LoLance Dec 11 '19 at 06:45
  • The trigger is about [pipeline](https://stackoverflow.com/questions/59265393/azure-devops-server-2019-tfvc-prevent-build-from-occurring-if-changes-are-only-I). If you're not using CI, which way did you set the original trigger? – Pod Mo Dec 16 '19 at 14:06
  • I selected scheduled, which is set at everyday at 1 am and I checked "Only schedule builds if the source or pipeline has changed" – livlif2fullest Dec 17 '19 at 17:15
  • Hi friend, what's the exact tfs version do you have? I test it in `Dev17.M153.2` and `Dev17.M153.3`, it has the exclude and include options. Is that what you need? – LoLance Dec 20 '19 at 10:33
  • This is the version information I see from the Azure DevOps Administration Console: Edition: Azure DevOps Server 2019, Product Version: 17.153.29207.5 (AzureDevOps2019.Update1) Not sure where you're looking to get the versions you mention. – livlif2fullest Dec 26 '19 at 11:54
  • Sorry, my mistake. This built-in function is now only available for Git but not TFVC. But you can post your feature request [here](https://developercommunity.visualstudio.com/spaces/22/index.html). and the team would consider it seriously if it gets enough votes :) – LoLance Jan 01 '20 at 11:57
  • Thank you @lance-li-msft, I found an existing one and upvoted that and added our criteria [here](https://developercommunity.visualstudio.com/content/idea/366019/add-path-filters-to-a-scheduled-build-trigger.html). – livlif2fullest Jan 13 '20 at 12:39

1 Answers1

1

You can exclude the utils folder in the CI trigger options:

enter image description here

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
  • I forgot to mention I'm not using CI, just scheduled at a certain time in the morning if changes are made. The reason why we're not using CI, is our team has some quality and testing issues, I.e. Lack of, so I don't want to do a build on every check-in until they start adhering to the process and are less likely to produce bad code, unless I'm misunderstanding CI's intent. – livlif2fullest Dec 11 '19 at 22:16