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.