Triggering artifacts cleanup on build result?

Answered

Hello,

TC 9.1.6

I'm trying to achieve automation that looks simple and natural for me.

I have three build configs, e.g. getA, getB, compareAB. getA starts every day at morning, getB at eveningб and they publish artifacts A and B, which are quite large files. compareAB is triggered by getB successful finish, and depends on two published artifacts. What I want is to delete artifacts A and B if compareAB finished successfully, because I don't need those arts to be on server and use disk space. If compareAB failed, I want everything to stay there so that I could look into artifacts manually. 

How can I achieve it? I did not find any triggering of cleanup by build result and references to artifacts belonging to other build conf. There are plenty of other build jobs in this TC, so I need cleaning up artifacts on specific build project.

Thank you.

2 comments

Hi Gleb,

Currently there is no such option in TeamCity. You can run cleanup via command line (see the comment) as the last step of compareAB build configuration. However it's not possible to run clean up for a specific build configuration.

0

Thank you, Alina. Sad story :)

0

Please sign in to leave a comment.