4

I can setup teamcity trigger to run tests whenever there in VCS checkin/ change.

Then I setup command line build steps to access files on system .

e.g. `custom script'

cd ~/Desktop
ls

But is there way to trigger test run if there is change in file e.g. test.txt

I want to setup trigger as 'if file changes run tests'.

Or it has to be git checkin?

user2661518
  • 2,677
  • 9
  • 42
  • 79

3 Answers3

4

You would add a new "VCS Trigger" under your project configuration and you would add a new "Trigger rules" specifying the file/directory that should trigger the build. For example: +:root=ContecIT:ContecRepairSystem/** (here I am saying monitor the VCS root "ContecIT", and watch for any files changes under the "ContecRepairSystem" directory.

Ben Richards
  • 3,437
  • 1
  • 14
  • 18
1

I'm not aware of any "FileSystemWatcher" feature in TC for triggering builds, unfortunately. Sounds like a good idea for a new TC plugin.

I've checked (here) if perhaps there's such a plugin already. Seems not. The "Url Build Trigger" comes closest. You could try to fork and adjust it to suit your needs.

I think your use case is quite rare. Usually a TC farm comprises many TC agents, each running on a different machine. Thus, they can't monitor the same filesystem (e.g. the Desktop directory), except perhaps some shared folders...

sferencik
  • 3,144
  • 1
  • 24
  • 36
0

VCS trigger configuration would monitor for any git checkin and triggers the build process

VCSTrigger settings

Syed
  • 417
  • 1
  • 6
  • 13