Failure Conditions: 'artifacts size' vs 'total artifacts size'


In the Failure Conditions window,

What's the difference between 'artifacts size' and 'total artifacts size' ?

In both cases hidden artifacts (perfmon) appears to be included in the size metrics. Is there any way to prevent this? I have a build config without any steps, which only archives code from the repo with an artifact path set to ".=>", and I only want the build to fail if the zip file is missing or zero bytes. As said, the build config may have other hidden artifacts.

Is there a way to detect when non-hidden artifacts <1 bytes? When the specified artifact path cannot be created, the build doesn't fail, only a message is logged: "Cannot calculate build metric 'artifacts size (bytes)' - no value".

1 comment
Comment actions Permalink

There's no direct option for this, but you can add another build failure condition "Fail build on specific text in build log" and use regex here.

In general, this means that your build configuration is too wide. You need to make it more strict, so artifact is always produced.


Please sign in to leave a comment.