We have a regular pipeline with multiple stages and post sections. The Archive artifacts is to be used in post section.
In the groovy for archive artifacts, user can give multiple artifacts(could be wrong) to archive.
As usual if there is wrong artifact, then this archive artifacts should throws exception for each wrong artifacts, and this works fine if non of the stages failed.
However, if any of the stage is failed in between, the archive artifacts in the post action do not throws exception for any of the wrong/missing artifacts.