WIP: Artifacts retention policy
What does this MR do?
Introduces configuration to retain last 'n' successful artifacts. This helps in removing older artifacts after a few successful builds have been run.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
Tasks:
-
Add clear_artifacts_after
on build with a default value of 10 -
Remove artifacts when build's clear_artifacts_after
becomes 0 -
Decrement clear_artifacts_after
on all builds on the sameref
after each successful pipeline run -
Builds without artifacts need not be cleaned up even when their clear_artifacts_after
has reached 0 -
Config file to support keep_success
-
Apply keep_success
on builds when a pipeline is run -
If user calls /keep
endpoint, do not clean up the artifact -
Refactor - Move clear_artifacts_after
tojob_artifacts
What are the relevant issue numbers?
Edited by Suganthi