How to make TeamCity build fail if artifacts are not found?

Is it possible for TeamCity to crash if no artifacts are found? I mean without writing any special script, i.e. Does TeamCity have such built-in features?

+3
source share
2 answers

No, you will have to implement this functionality in your build script.

i.e. if you are using MSBUILD .. after everything is done, run the following command:

<Error Condition="!Exists('someArtifact.txt')" Text="Error!!! Artifact doesn't exist" />
+3
source

In TeamCity 7.x, you can catch this using the build failure condition. You can add a condition to your build configuration to discard the specific text found in the build log.

For example, a text failure:

    Artifact path file.txt not found

, , .

+4

Source: https://habr.com/ru/post/1770373/


All Articles