Trouble with github integration & labeling

Hey guys, I am just getting started with TeamCity. I am using github's service hook to trigger a build when someone commits code. The problem I am having is when I enable VCS labeling. This seems to cause an infanite loop of triggering the build every time it gets labeled. I googled around a bit im not sure if I need checkout rules for the VCS, I did try a few but im pretty lost here. Any help would be great!


Thanks
James Brink

1 comment
Comment actions Permalink

Hi James,

at the moment TeamCity webhook doesn't filter which pushes to the repository should trigger the build. So yes TeamCity goes into infinite loop:
- someone pushes to the repo
- github triggers the build
- TeamCity makes a tag for revision of the build and push it to github
  etc.

VCS rules won't help here. They help when tags are implemented as a changes to the file in version control, like .hgtags in mercurial. In this case you can filter out such changes and do not trigger a build on them. And it only works when regular vcs polling is used. Since webhook triggers a build directly, TeamCity has no chance to ignore it.

I created a pull request for 'github-services' which adds a field 'branches' to the TeamCity webhook settings, so you can configure it to trigger the build only on interesting changes: https://github.com/github/github-services/pull/345.

As a workaround you can either disable labeling or use vcs polling instead of webhook.

0

Please sign in to leave a comment.