v7 fail on specific text ; how to see warnings

hi, I want to capture in my email notification whether the build compilation had warnings.
I tried ;
fail on specific text in build log = contains / exact / "warning" /
message= warning seen on; %env.BUILD_NUMBER%

This fails for my purposes;
1.The build# variable doesn't substitute.
2.The line that flags the fail is not shown, so actually I'm not necessarily sure what it found.
3.It is flagging because of the line "0 Warning(s)".

How can I get this to work? thank you!

4 comments
Comment actions Permalink

Hello,

>  I want to capture in my email notification whether the build compilation had warnings.

Do you need to include the warning lines into email notification message?

This is not directly supported, but it can be achieved with a bit of developer's expertise.

e.g. it should be possible by customizing notification template: traversing the build log in the email notification template, see TW-8621.

However, this is likely to cause performance issues as each notification will traverse the entire build log.

> fail on specific text in build log = contains / exact / "warning" /

> message= warning seen on; %env.BUILD_NUMBER%

The message defines how the build fialure will be logged into the build log. Why would you need the build number inside the build log of a build?

> 3.It is flagging because of the line "0 Warning(s)".

To match only relevant lines you can use regexp instead of exact match.

0
Comment actions Permalink

>Why would you need the build number inside the build log of a build?

I'd like to be able to include values of any parameters, so that was merely a test. It seems I cannot do that?

0
Comment actions Permalink

Hi Anne
By your request I've checked parameter resolucion, and have not reproduced the issue. Parameters should be resolved correctly.
If the issue is reproduced in latest EAP build, please provide us more info:

  • number of tested TeamCity build
  • screenshot of configured failuire conditions
  • build log with resulted failure message.


Thanks

0
Comment actions Permalink

hi! I'm on 7.0 eap 20334 (not the latest eap).

//oops rewriting, I was in the wrong question

0

Please sign in to leave a comment.