3

In the documentation, it seems that we can set the expire-in to several days or weeks. But I cannot decide an accurate fixed date. Is it possible to always keep the 'lastest' artifact, and remove the old one when a new one is successfully built?

D Asp
  • 85
  • 8

1 Answers1

3

Okey. I found a solution here :

https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html#keep-artifacts-from-most-recent-successful-jobs

With this help, it can be easily reached. The question should be closed.


Here's the instruction given by gitlab official.

Keeping the latest artifacts can use a large amount of storage space in projects with a lot of jobs or large artifacts. If the latest artifacts are not needed in a project, you can disable this behavior to save space:

  • On the top bar, select Menu > Projects and find your project.
  • On the left sidebar, select Settings > CI/CD.
  • Expand Artifacts.
  • Clear the Keep artifacts from most recent successful jobs checkbox.

You can disable this behavior for all projects on a self-managed instance in the instance’s CI/CD settings.

D Asp
  • 85
  • 8
  • Then mark your reply as the correct answer. – aljaxus Jun 09 '22 at 11:58
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 11 '22 at 06:39