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?
Is it possible to set the expiration of artifact to 'next-successful-build' in gitlab?
Okey. I found a solution here :
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.
Then mark your reply as the correct answer. –
Elinaelinor
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. –
Shuttlecock
© 2022 - 2024 — McMap. All rights reserved.