4

I am using TeamCity 8.05 with github and feature branches.

I have a problem that team city will sometimes trigger a build on a feature branch for reasons unknown. It happens overnight or over a weekend when the server is idle. If I click on the build changes its always an old feature branch with no changes for several months. I have no idea why this would cause a build trigger.

Its also very inconsistent - we can go for a week or 2 with no spurious builds and then we will come in one morning and team city has overnight built 6 old feature branches and deployed an random old release. None of these branches have any recent github activity and have been built by TC in the past (when the last changes where made).

Does anybody have any idea whats going on or if there are any logs anywhere I can look at to find out why team city thinks it needs to build.

Twisted
  • 2,939
  • 4
  • 32
  • 54
  • What do you have in Build Triggers? – Mohammad Nadeem May 29 '14 at 11:04
  • There is only 1 trigger which is vcs trigger, branch filter is set to +:* Quiet period mode is set to "do not use" end every other field, including trigger rules, is unchecked or empty. – Twisted May 29 '14 at 11:41
  • There are several log files available under Administration -> Diagnostics -> Server Logs (although I'm looking at v8.1.2... may be different in v8.0.5). Otherwise on the server they'll be in {TeamCityInstallDir}/logs/. You might find useful information in teamcity-vcs.log. – SteveChapman May 29 '14 at 11:59
  • Thanks for the tip about the logs. I'm wondering if its our build clean up policy - it cleans up build history (but leaves statistics) after 90 days. the cleanup process runs at 3am which is around the time these old builds happen. I wonder if TC deletes an old build then straight away sees the branch in git and builds it again. I've made a note of the oldest build branch in our history - I'll see if that rebuilds soon. – Twisted May 29 '14 at 14:27
  • I just clicked "clean up now" and sure enough the build server is now flat out rebuilding the old branches that where cleaned up. – Twisted May 29 '14 at 14:35

1 Answers1

4

This is caused by the Build History Cleanup feature of team city which was configured to clean the build history for builds older than 90 days.

When the most recent build for a particular feature branch is cleaned and that branch still exists in github team city immediately finds it again and triggers a new build.

I would say that this is a bug in team city. commits on an "unknown" feature branch from 3 months ago should not be interpenetrated as a new feature to add into the build.

Twisted
  • 2,939
  • 4
  • 32
  • 54
  • 1
    Reported this to Jebrains. They have fixes for this in 8.05 and 8.06. Following an upgrade to 8.1.2 the problem has gone away. – Twisted Jun 09 '14 at 15:47
  • You get three upvotes from me. Thanks for reporting this, I think it's saved me some headaches. – Jerad Rose Nov 12 '14 at 15:57