-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
traceImportant produces a normal message in TeamCity #2108
Comments
To extend this, error also doesn't work as status should be error. |
@BlythMeister So when you (or any api you use) uses |
No, but reporting a message as an error message doesn't make build fail (I don't think) There is another issue that when a target ends with a failure result, the TeamCity listener should post an build failure with the close block error message. (I think) |
As far as I know, in TeamCity 'ERROR' != 'FAILURE' |
@BlythMeister Can you verified that? |
@BlythMeister A build definition has a setting in the "Failure conditions" that looks like "Fail build when errors are logged". |
Ahh yeah, I never have that enabled 😂 |
The reason why I asked is because we tried to change stuff there in there past and usually people start to complain that there builds are failing (even when they should fix their builds) |
Or put differently, when we decide to do it I'll probably close those issues with "by-design" or have a workaround ready ;) |
We could for example add documentation for the TeamCity option if that already exists. |
We can start by changing just the behavior of |
@otto-gebb I just want to discuss and decide this once and for all, we changed to policy countless times in the past, reverted releases/prs and I want this to end :) |
@matthid I get it. In my opinion |
You can report messages for a build log in the following way: ##teamcity[message text='' errorDetails='' status=''] where: The status attribute may take following values: NORMAL, WARNING, FAILURE, ERROR. The default value is NORMAL. The errorDetails attribute is used only if status is ERROR, in other cases it is ignored. This message fails the build in case its status is ERROR and "Fail build if an error message is logged by build runner" box is checked on the Build Failure Conditions page of a build configuration. For example: |
Quote fail .. but that is from the TeamCity docs on status messages. |
@matthid I'm happy to raise a pr to make fake work to how the TeamCity docs state. |
@BlythMeister Yes that would be very welcome, feel free to update the docs (=api docs for the teamcity module similar to the TeamFoundation one) as well (just link to official docs) |
@matthid this would extend on @otto-gebb pr to include trace error and a "block" ending with a failure. |
Currently this functionality is broken again, except it's even worse: |
Yes please, you can link back here. Also I'd love to get help on this.... |
traceImportant
produces a normal message in TeamCity, although it should produce a warning.Repro steps
TEAMCITY_VERSION
environment variable to 1.traceImportant
call in it.Expected behavior
The message is logged as
Actual behavior
The message is logged as
Known workarounds
Use this function instead of
traceImportant
:Related information
The text was updated successfully, but these errors were encountered: