Prevent artifacts being published on failed build?

I want to publish the binaries produced by a build as artifacts, but only if they pass all the tests. I can't find any way to prevent the artifacts being published - am I missing something?

Thanks
Akash

2 comments
Comment actions Permalink

Why not have your build script generate the artifacts after the junit tests are run.  In this case if unit tests fail then there will be no artifacts to p
ublish.

0
Comment actions Permalink

I'd just come to the same conclusion myself immediately after posting the question! I'm going to try it, though it seems like a simple scenario for TeamCity to handle automatically.

0

Please sign in to leave a comment.