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?
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.
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...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With