Is it Possible to Have Mulitple Artifacts Mappings?

I’m wondering if it’s possible to have multiple artifacts mappings in my gitlab-ci.yml, so that I can treat a subset of the artifacts differently than the rest. Specifically, there are few artifacts that I would like to keep around indefinitely, while the rest expire after 20 mins.

Here’s what I’ve tried:

...
  artifacts:
    paths:
    - a/dist/
  artifacts:
    expire_in: 20 minutes
    paths:
    - x/lib/
...

The CI runner seems to ignore the first artifacts mapping and only produce the artifact from the last artifacts mapping found.

Is it possible to do this somehow (treat a subset of artifacts differently than the others)? Thanks in advance.

1 Like

I am looking for the same and can’t find a solution.

This is something I’m also interested in!
It would also be useful to be able to select different artifacts upon success or failure, e.g. uploading built output on success and log report on failure.