feature branch builds vs. default branch
Hello,
Long time ReSharper user here... recent TeamCity user. I've convinced my organization to switch to TeamCity / Octopus Deploy, and I am largely responsible for setting it up. This isn't my first foray into build systems, but I'm somewhat perplexed here and hoping that someone can help with this issue.
I have a project - it's default branch is 'development'. I have a build configuration for this branch that has a VCS Trigger watching for commits to that branch. When it sees something, it builds, tests, and publishes the nuget package as a build artifact. Fantastic. For that same project, I'd like a build configuration to watch feature branches, building and testing (but not deploying) when commits occur there. All of this seems to work at present, but I have one somewhat annoying issue with this. See the following screenshot here:
In the screenshot, you can see that in my feature branch build configuration 'Build, Test' that there are 'pending' changes. Those pending changes represent a commit that occurred on the development branch - but this is my feature branch build configuration. I don't ever want it to build when a checkin occurs on my development branch - but the UI seems to indicate that something needs to be built. The inverse occurs as well - feature branch commits appear as 'Pending' on the 'Build, Test, Publish' build configuration.
Again, it does what I want it to - it's just somewhat annoying to look at the UI and have it indicate that something is 'Pending' when my configuration indicates that it shouldn't be. I've seen other suggestions that favor creating a dummy branch and pointing it to that for 'default' and never committing to it, but that seems rather hacky to get around this issue. Is there an official, supported solution for this scenario?
Please sign in to leave a comment.
Hello Jeff,
It seems that in this case you can create two separate VCS roots, one that watches development branch and second VCS root that watches feature branches. In the second VCS root you can make one of the feature branches default branch. At the moment it's not possible to create VCS root with no default branch, please see the related request: https://youtrack.jetbrains.com/issue/TW-23395.