VCS trigger for GIT not triggering a build
Answered
Whenever there are new commits the build is not getting kicked off.
For example, today I verified the pending changes tab had one item and the last build happened 10 hours ago. Shouldn't happen right?
Do I have any incorrect config set?
Please sign in to leave a comment.
Hello Ricardo,
Do I correctly understand that the build is not added to the queue? Please check the queue, perhaps the build was triggered but does not start?
If the build was not added to the queue, then please attach
Do you see it in any build configuration or in one only?
Hi.
It's been triggering today, I'll keep an eye on it, don't close this yet.
Thanks.
Hi again.
Pending changes and the build doesn't trigger:
I see this in the log, build still hasn't triggered:
[2016-11-21 13:17:17,876] INFO [ changes pool 1] - jetbrains.buildServer.VCS - Scheduling checking for changes for 1 VCS root instances start: 0 msec
[2016-11-21 13:17:17,878] INFO [ changes pool 1] - jetbrains.buildServer.VCS - Scheduling checking for changes for 1 VCS root instances stopped: 2 msec
Hello Ricardo,
Could you please also attach screenshot of the VCS root settings,teamcity-server.log* and teamcity-vcs.log*? You can create a ticket to send logs privately, please use "Submit a request" link on the top of the page.
What TeamCity version do you use? We have the bug in our tracker that can be related: https://youtrack.jetbrains.com/issue/TW-47328. Does it look like your case?
Hi Alina.
These are indeed merge commits - is that proven to be a real bug?
Thanks.
Hi Ricardo,
Yes, the bug is created by TeamCity Git plugin developer. Is bug description looks like your bug?
Yes, it does like mine indeed.
Hello Ricardo,
It seems that the linked bug is not your case. The problem in the ticket is that the builds are not triggered for each commit, however there should be no pending changes. So we would need logs to investigate the case. If you can reproduce the issue, please enable debug-vcs loggin preset on Administration > Diagnostics page, reproduce the issue and attach the resulted teamcity-server.log* and teamcity-vcs.log*.
Thank you!
I have the logs, how can I send them to you?
it's happening now, 11 pending changes - no build.
Just emailed you the logs
Hi.
Any news on this issue?
Thanks.
(Copied from email support):
The reason was in 'teamcity.vcsTrigger.runBuildOnSameRevisionInEveryBranch' parameter set to false.
This explains why builds are not triggered. You have a commits graph like this:
TeamCity ran a build in the default branch on commit dd97b710 and build in the 'task-2104-policy-documents' branch on the commit 8606430b. TeamCity excluded the commit 736d1d73 by checkout rules.
Due to the 'teamcity.vcsTrigger.runBuildOnSameRevisionInEveryBranch=false' option VCS trigger doesn't run build in the default branch on pending commit 8606430b because there was a build in another branch on this commit. Same explanation for 897e3d1d.
Remove the 'teamcity.vcsTrigger.runBuildOnSameRevisionInEveryBranch' parameter or change its value to true and builds will be triggered.
Correct. Thanks for your help!!
I look to be facing a similar issue with this but I do not see teamcity.vcsTrigger.runBuildOnSameRevisionInEveryBranch configured for my teamcity instance which is 8.0.4 (build 27616). A bit old I know.
But is there a known issue here? I see other targets for the same have been built.
Are there known issue with this in tc8?
Would configuring separate vcs root per target workaround the issue?
Hello Edward,
8.0.4 is more than 3 years old version, there were many changes in this area since this release. I would recommend to upgrade to the latest TeamCity version (10.0.4 as of now) and check if the issue is still actual. If it is reproduced on the latest version we will be interested in investigating the case in more detail. I do not think an investigation makes sense in earlier TeamCity versions as the issue might not be actual already and even if not, we will not be able to provide any patches/fixes to an obsolete version.
Thanks Alina. We are in progress for an upgrade.