Hi Anton,
Many thanks for the quick response. I think i know how to configure the gate build as code (as i have it running already), the thing is that i do not know how to make sure that build definition updates (that might be part of a pull request) would then be also taken into account by TeamCity when the build is run for an actual pull request. I.e. currently the build definition (.teamcity content) is always taken from the master branch, the build then runs against the pull request branch (all content outside of .teamcity space), and the branch is than merged to the master. This way people could break the build definition if they incorporate new incompatible changes to the .teamcity space (which would pass the gate build for the actual pull request, but could fail the next one). My question is whether the above mentioned scenario is possible due to some misconfiguration on my side, or if it is something that can not be avoided in principle (i know the situation described here resembles this chicken and egg problem). That is the reason why i asked for a blueprint. I can share an example project as requested.
Cheers,
~Jakub