Question

I have a GIT repo for my project with 2 folders - Client and Server, containing corresponding code in each folder. I would like to have two teamcity build procedures, one each for client and server code changes. In the current setup, the entire GIT repo is checked out and built. I would like to restrict the client build only to client code changes and server build only to server changes.

One option is to split them to 2 different repos, but this is inconvenient for the developers.

Is there a way to configure teamcity to listen to changes only on a specific folder ?

Was it helpful?

Solution

You still could split client and server in two repos, and keep the same folder structure for the developers, since both repos could be declared as submodules in the parent repo.

And you can setup those submodules in the parent repo in order to follow the latest commits of their respective master branch.

That way, it is easier for TeamCity to follow only the commits of one specific repo (the client on, or the server one), since partial cloning isn't supported with git.

OTHER TIPS

Within TeamCity (On Premise at least) there is a way to trigger a build only if a change occurred in a specific (or multiple) subdirectory, which seems to be exactly what you're asking for.

Using VCS Trigger Rules you can create a Trigger Rule with your VCS Trigger on a build based on a specific (wildcard) path. In your example you could create one build with a Trigger Rule for server/** and another build with a Trigger Rule for client/** (assuming these are the directory names in the repository).

Make sure to choose Trigger build as the Rule Type. You can add multiple wildcard paths in a single Rule as well, each on a new line.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top