Option to only keep latest artifact for each branch.

Description

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 keep_latest.

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.

~"feature proposal"

Proposal

Add an option keep_latest to the artifacts:section in .gitlab-ci.yml files. When this option is set to yes for example, an artifact should only expire when a newer artifact is created.