Branch Filter working?

As far as I understand it should be possible to start a build on a push within a branch. That would enable me to test that branch within TeamCity first, ahead of a merge to master. That was exactly what I was looking for, it seems a pretty new feature.

I have a pretty basic setup which polls a GitHub repository. For master branch that works alright. But I don't get it working for other branches. Neither by polling or by explicit runs I ever see any reported changes.

  • I would think that +:* pattern should already do what I want, but it doesn't.
  • I tried +:refs/heads/branchName, nope. Added *, nope.
  • Also I tried just +:branchName, nope.
  • I did this as Branch Filter in the VC settings of a project, no luck.
  • Also in Branch Specification of the VCS Root, same result.

So does this actually work or am I missing something?

0
3 comments

This is a feature that is supported by TeamCity and we do have some detailed documentation on setting this up available here: https://www.jetbrains.com/help/teamcity/working-with-feature-branches.html#WorkingwithFeatureBranches-Configuringbranches

The Branch Specification field is where you would define the additional branch or branches that you would like to monitor. Without knowing exactly how things were configured at the time of failure, I'm not sure why this wasn't working for you. There are a lot of potential areas that could interfere. Take a look at the documentation and let me know how it goes for you. It is a great feature.

0

Hi Eric,

Thanks for your advice, that did help me further.

I got it working by by a manual custom build, of which I did not know yet. After that it also got triggered by remote changes and it really got going. It is neat to be able to run branch builds at will and filter on the output.

I don't know what went wrong at first. I got it working by a branch specification of '+:refs/heads/branchName' in the subproject VCS Root and the default filter in the configuration VCS settings. (Describing it a bit more precise.)

I still wander if my settings were necessary at all. Shouldn't it works by just the default settings? Or is it necessary to define 'active' branches the way I did?

Anyway, it is comforting to have actually seen it working. Which helped to me move my development by a couple of paces.

Robert

0

Thanks for following up, I'm glad you were able to get it working. This is only one of the great features of TeamCity for increasing the efficiency of development. You may also want to explore Build Chains for testing when pushing changes to your branch. Many of our customers find linking several Build Configurations together to be helpful in streamlining their processes. 

For example, if you need to run tests on your branch for several platforms before your release builds, you could set up a Build Chain to automate everything from start to finish. You can read up on Build Chains in our documentation here: https://www.jetbrains.com/help/teamcity/build-chain.html.

0

Please sign in to leave a comment.