Build failure condition should validate but build job should pass
Hi TeamCity,
My Scenario:
I have a build failure condition which searches for a particular text in the build log (Say for example "hello"). The thing is I have that text (hello) in my build log and my fail condition is detecting it which is very fine. But it reflects in the build and i get a error when running the job (By logic that should only happen).
What I Want:
I want the failure condition to detect the text and show me its failed, and also i want my build to be successful. Any one has a solution for this ??
Please sign in to leave a comment.
Hi,
Failure conditions are by design the conditions which _fail_ the build.
Do I understand you right that you want to make it clearly visible on the build results that the build log has a specific text, but presence of that text should not affect the build status?
If so, then how do you plan to use it and why do you need that knowledge? May be the build should then get a "warning" status instead of "failure"?
If you can clarify the use case, it will help understand what can be improved in the product.
NOTE: The issue is now solved with a Regular Expression.
The case was, in the log I had a string called "condition-failed" which the regex detects and fails the build (bcs "failed" is considered as a failure condition). It should detect the word failed and should stop the build, but except for that particular string "condition-failed". So I wrote a regexp that skips "condition-failed" but still detects for the word "failed" and stops the build. Hope this is clear.
Thanks.