Teamcity triggering builds for no visible reason

Hi,

I just upgrade to 9.1.5 to solve some bug and I realized TC is triggeirng builds for no reason. This seems to have started with earlier version already.
At an approximate rate of ~20/day, typically on Sundays, at what seems to be random times. Sometimes hours appart, sometimes every 2mns.

All our builds are Maven builds, configured with 2 triggers:
- Triggers a build after a VCS check-in is detected
- Triggers a build when any of the project snapshot dependencies is updated in the remote repositor

The 2nd trigger could be suspicious but right now must builds only have 2 SNAPSHOT dependencies that don't change very often.

Is it a known problem?
How can I figure what has triggered a build?

Cheers

4 comments

Hello,

We are not aware of such kind of issues. What do you see in the "Triggered by" on the build's overview page? Also you can check teamcity-server.log, the reason should be mentioned there.

0

Hi Alina,

thanks for your answer.
My problem is that I don't see any "Triggered by" section on the build's overview page and have no way to know what's going on.
Searching for the word "triggered" gives not match in the documentation.
But teamcity-server.log gives a lot of matches: so I can see that an application User Service build is triggered many times by a Maven dependency common-1.1-SNAPSHOT:

[2015-12-25 08:48:31,885]   INFO - tbrains.buildServer.ACTIVITIES - Finished build  User Service :: run 'mvn clean deploy -Dspring.profiles.active=test -U' {id= UserService_RunMvnCleanDeployDspringProfilesActiveTestU, internal id=bt11} #595 {build id=4803, promotion id=4803, branch=<default>, history=false, agent="Default Agent" {id=1}, triggered by "com. :common:1.1-SNAPSHOT" (com. :common:1.1-SNAPSHOT). Started Fri Dec 25 08:46:30 CST 2015}
committers
[2015-12-25 08:48:31,944]   INFO - tbrains.buildServer.ACTIVITIES - Build started;  User Service :: run 'mvn clean deploy -Dspring.profiles.active=test -U' {id= UserService_RunMvnCleanDeployDspringProfilesActiveTestU, internal id=bt11} #596 {build id=4804, promotion id=4804, branch=<default>, history=false, agent="Default Agent" {id=1}, triggered by "com. :common:1.1-SNAPSHOT" (com. :common:1.1-SNAPSHOT). Started Fri Dec 25 08:48:31 CST 2015}
[2015-12-25 08:50:34,237]   INFO - tbrains.buildServer.ACTIVITIES - Finished build  User Service :: run 'mvn clean deploy -Dspring.profiles.active=test -U' {id= UserService_RunMvnCleanDeployDspringProfilesActiveTestU, internal id=bt11} #596 {build id=4804, promotion id=4804, branch=<default>, history=false, agent="Default Agent" {id=1}, triggered by "com. :common:1.1-SNAPSHOT" (com. :common:1.1-SNAPSHOT). Started Fri Dec 25 08:48:32 CST 2015}

3 builds are started at 3mns interval, where the last build from this common-1.1-SNAPSHOT dates back form the previous day:

[2015-12-24 11:25:03,917]   INFO - tbrains.buildServer.ACTIVITIES - Finished build Common :: run 'mvn clean deploy -U' {id= Common_RunMvnCleanDeployU, internal id=bt7} #91 {build id=4749, promotion id=4749, branch=<default>, history=false, agent="Default Agent" {id=1}, triggered by "Admin" (##userId='1'). Started Thu Dec 24 11:24:25 CST 2015}

I've doubled check that the information taken form teamcity-server.log matches the resulting artifacts present in our Nexus central repo.

The latest common-1.1-SNAPSHOT artifact present in the file system dates back from the build indicated in teamcity-server.log:

Dec 24 11:25 common-1.1-20151224.032501-6.jar


So unfortunately I can't explain why these 3 last builds of the User Service system have been triggered. And these are only the 3 last ones, there're many more.

What else can I do to understand these Maven dependencies triggers? Is there anyway to debug more in depth?

0

This problem is still on, and when I'm lucky enough to witness a running build I can see that trigger reason is a Maven dependency (common-1.2.0-SNAPSHOT in one typical case)
However this dependency hasn't been updated in days. I double checked on the Nexus repo we use.

So what could cause TC to think that this dep. has been updated?

How does it work? I guess it relies on Maven to resolve SNAPSHOTS, doesn't it?

We use a Global Maven settings.xml configured at the <root> project level and inherited by all projects, where the Nexus repo is configured.

BTW I can't update it: apparently I'd have to recreate one and update all project depending on it.

What would be the right way to do this?

0

We just had a week holiday and main build kept being triggered:

 

 

 


This is the main build, it's got to internal Maven snapshot dependencies, and none of those two were updated in the past 12 days.

I don't know what to do, I can only disable the "Maven Snapshot Dependencies Trigger  (disabled)" as it is likely what causes the problem.

(It's pretty hard to find back your post since the disappearance of devnet.jetbrains.net...)

0

Please sign in to leave a comment.