Is it possible to set gitlab-ci expire in value for artifacts depending on job success?

Viewed 347

I want artifacts for successful jobs to expire in 1 hour, but for failed jobs to expire in 1 day. Is it possible to do this?

1 Answers

Multiple artifacts aren't possible yet. You can find the current proposal here

You can define multiple paths for the artifact:

job:
  artifacts:
    paths:
      - failure_file
      - success_file

Without any error, it will ignore the file if it doesn't exist.

Related