Option to only keep latest artifact for each branch.
I'd like to propose an option in
.gitlab-ci.yml to only keep the latest artifact for each branch or pipeline. Maybe such an option could be used in combination with
expire_in to let older artifacts expire after a certain amount of time. A good name for this option could be
Our use case: We automatically download the latest artifact for a few branches from GitLab. Over time quite a few artifacts might pile up, eating a considerable amounts of disk space. Most branches are not updated regularly, so
expire_in is not very helpful here.
Add an option
keep_latest to the
.gitlab-ci.yml files. When this option is set to
yes for example, an artifact should only expire when a newer artifact is created.