Is it posible to fail TeamCity builds if artifacts are not found? I mean without writing any special script, i.e. does TeamCity has such built-in functionality?
In TeamCity 7.x you can catch this using a build failure condition. You can add a condition in your build configuration to fail on specific text found in a build log.
For example fail on text:
    Artifacts path file.txt not found
This works, I use it in my builds to catch missing artifacts.

No, you're going to have to implement that functionality into your build script.
i.e. if you are using MSBUILD .. after everything is complete run the following command:
<Error Condition="!Exists('someArtifact.txt')" Text="Error!!! Artifact doesn't exist" />
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With