I have recently started using GitFlow, and I am trying to setup the various Build Configurations that I think are required to make it work.
I my eyes, there should be at least 3 build configurations.
The first would have a branch spefication like the following in the VCS Root:
i.e. targetting only commits to feature, hotfix and release branches. The build steps associated with this build configuration would ensure that each commit compiles correctly, but might not do more rigorous unit/integration tests.
The second would have a branch specification like the following in the VCS Root:
i.e. only interested in when a Pull Request is initiated from a working feature, hotfix or release branch, into either the develop/master branch. The build steps assocaited with this build configuration would then ensure that not only the code compiles, but that any unit/integration tests, also pass.
The final build configuration would have a branch specification like the following in the VCS Root:
i.e. only interested in running the build when there are commits into the master and develop branch.
With this setup in place, I am happy to say that I "think" I have a pretty good system in place, and it follows the GitFlow practices quite closely.
There is however, one problem. When I have a branch specification like this:
Where I am trying to set up the build configuration to ONLY be interested in Pull Requests, I have to put "something" into the default branch, and since the Pull Request branches are short lived, I can't use one of them. As a result, once a Pull Request is merged into say develop, my third build configuration listed above is kicked off, and I am then left with pending changes in the second build configuration, since there are changes in the develop branch.
I know that these don't mean anything, and can be ignored (or I am manually trigger a build from the develop branch), but I also find it a little jarring. Is there a way to tell TeamCity to completely ignore any changes in other branches, and only be interested in changes that are releated to entries in the branch specifications?
Or, am I doing something completely wrong, and there is a better way to do what I want?