We have 2 instances of bitbucket in 2 different offices using the same cloud bitbucket instance. Currently every checking made is triggering the build in both teamcity instances.
But we want that each change made in the VCS only be build in the office where it was commited.
We are looking for a solution in two ways all of them based on the user of the commit:
1. Check on the user in active directory and depending of the office he belongs to, trigger the build for that office
2. Create a group in teamcity for each office and check if the user belogs to that office and trigger the build on his offcice
This 2 solutions require that we create a custom trigger. So I want to validate if someone had faced this kind of issues before or if any of you could have a different approach we can validate.
Any comment, advice or solution will be appreciated.
Thanks in advance