Project
TeamCity
Priority
Major
Type
Feature
State
Fixed
Assignee
Victory Bedrosova
Subsystem
Agent
Affected versions
No Affected versions
Fix versions
Faradi 7.0 EAP (20184)
Fixed in build
20166  
Fixed in builds
no build yet
  • Created by   Yegor Yarko
    4 years ago (21 Nov 2007 21:32)
  • Updated by   Robert Rehberg
    6 months ago (11 Nov 2011 00:17)
  • Jira: TW-3917
    (history, comments)
 
TW-3917 Fail build on specific messages appearing in the build log
14
Issue is visible to: All Users
  The issue is visible to the selected user group only
In some cases providing build exit code is not easily achievable task (e.g. build can perform multiple different tasks which can even fail to notify on the failure properly).

Let's address this by providing ability to specify a set of output texts that, when matched will fail the build.

Flexible solution can allow to provide regexp to be matched and also provide the fail reason (with back references to the regexp) to be included int he build status text.

Should be configurable per build configuration.

Can supply default texts from various JVMS (see TW-1360)
Comments (5)
 
History
 
Linked Issues (?)
 
Yegor Yarko
  Yegor Yarko
17 Feb 2009 10:50
3 years ago
Another fail message candidate:
"There is not enough space on the disk."
Example from MSBuild:

[20:07:28]: [Project "TodoExplorer.csproj" (Rebuild target(s)):] Processing resource file "src\TodoItemFilterDialog.resx" into "C:\Agent\work\18999c274dda3ce5\src\TodoExplorer/../..\obj\TodoExplorer\Release\JetBrains.ReSharper.TodoExplorer.TodoItemFilterDialog.resources".
[20:07:28]: [Project "TodoExplorer.csproj" (Rebuild target(s)):] Processing resource file "src\TodoItemPatternDialog.resx" into "C:\Agent\work\18999c274dda3ce5\src\TodoExplorer/../..\obj\TodoExplorer\Release\JetBrains.ReSharper.TodoExplorer.TodoItemPatternDialog.resources".
[20:07:28]: [Project "TodoExplorer.csproj" (Rebuild target(s)):] C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets warning MSB3101: Could not write state file "C:\Agent\work\18999c274dda3ce5\src\TodoExplorer/../..\obj\TodoExplorer\Release\TodoExplorer.csproj.GenerateResource.Cache". There is not enough space on the disk.
[20:07:28]: [Project "TodoExplorer.csproj" (Rebuild target(s)):] C:\Agent\work\18999c274dda3ce5\Platform\Build\Platform.AfterMicrosoftCommon.Targets(82, 3): There is not enough space on the disk.
[20:07:28]: [Project "TodoExplorer.csproj" (Rebuild target(s)):] System.IO.IOException: There is not enough space on the disk.
Yegor Yarko
  Yegor Yarko
17 Feb 2009 12:50
3 years ago
Java out of disk space example:
[11:48:47]: [AllTests] com.intellij.historyIntegrTests.revertion.ChangeReverterROStatusClearingTest.testClearingROStatusOnlyFromAffectedFiles (3s)
[11:48:51]: [com.intellij.historyIntegrTests.revertion.ChangeReverterROStatusClearingTest.testClearingROStatusOnlyFromAffectedFiles] java.io.IOException: There is not enough space on the disk
[11:48:51]: [com.intellij.historyIntegrTests.revertion.ChangeReverterROStatusClearingTest.testClearingROStatusOnlyFromAffectedFiles] java.io.IOException: There is not enough space on the disk
 at java.io.WinNTFileSystem.createFileExclusively(Native Method)
 at java.io.WinNTFileSystem.createFileExclusively(Native Method)
 at java.io.File.checkAndCreate(File.java:1345)
 at java.io.File.createTempFile(File.java:1434)
 at com.intellij.openapi.util.io.FileUtil.doCreateTempFile(FileUtil.java:354)
 at com.intellij.openapi.util.io.FileUtil.doCreateTempFile(FileUtil.java:343)
 at com.intellij.openapi.util.io.FileUtil.createTempDirectory(FileUtil.java:320)
 at com.intellij.testFramework.IdeaTestCase.createTempDirectory(IdeaTestCase.java:633)
 at com.intellij.historyIntegrTests.IntegrationTestCase.getIprFile(IntegrationTestCase.java:55)
 at com.intellij.testFramework.IdeaTestCase.setUpProject(IdeaTestCase.java:163)
 at com.intellij.testFramework.IdeaTestCase.setUp(IdeaTestCase.java:136)
 at com.intellij.historyIntegrTests.IntegrationTestCase.setUp(IntegrationTestCase.java:37)
 at com.intellij.testFramework.IdeaTestCase$5.run(IdeaTestCase.java:471)
 at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
 at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Oleg Gerovich
  Oleg Gerovich
29 Jul 2010 01:27
21 months ago
We are finding ourselved in real need of this to handle problems from batch scripts called from command-line runner. Otherwise, builds that REALLY fail are still marked successful. Need that regexp option...
Oleg Gerovich
  Oleg Gerovich
11 Feb 2011 20:54
15 months ago
MSDeploy is another example that has to be handled in a special way since it always returns 0 exit code regardless of success/failure. We are seeing this problem now in 6.0.1.
http://stackoverflow.com/questions/2314132/how-do-i-parse-the-output-of-msdeploy-and-fail-a-teamcity-build-if-there-are-erro
Robert Rehberg
  Robert Rehberg
11 Nov 2011 00:17
6 months ago
This will elegantly solve a bug we are currently seeing with Gallio. It fails but does not totally crash and the exit code is still zero. We were just looking to see if we could find the build log and scan it but this would be MUCH, MUCH better. For the interested, the bug mentioned is found here:

http://code.google.com/p/mb-unit/issues/detail?id=856

In our test output we are getting "Internal error: An unhandled exception occurred. System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain."