Our TeamCity process basically involves 3 "Build Configurations" that run in sequence:
I've recently amended Step 1 to also pick up changes from Pull Request branches on GitHub, so that the Pull Request can be updated with the build result. I want to also run the Unit Tests for each Pull Request, but obviously not do any deploys in these cases.
So Step 1 has a Branch Filter to match the default branch or Pull Request branches. I can update the Trigger in Step 2 to also have this Branch Filter. However, the Triggers in the Deployment Steps do not have the option of a Branch Filter.
How can I only run the Deployment Steps for builds from the default branch?
My solution to this was to create a new Build Configuration solely for Pull Requests; this contains build steps to do the compilation and run the unit tests.