Support "pipeline-only" artifacts (that expire as soon as pipeline finishes)
Description
Both Caches and Artifacts have their limitations:
- Caches are not guaranteed to be populated in some cases (notably when using multiple runners without distributed caching and without a common network-mounted directory).
- Artifacts expire only some time after being uploaded.
In order to cache dependencies between pipelines and stages, one could:
- Use a cache.
But: Each job would still need to consider the case where the cache is not populated (see above), i.e. run the dependency manager (which costs time). - Use an artifact that is created with the dependencies in an early stage job (using the cache).
But: These artifacts persist after the pipeline has finished until they expire.
Proposal
It should be possible to define artifacts that expire as soon as the pipeline finishes*.
(* = Or ideally more precisely: as soon as the pipeline finishes successfully, or as soon as the pipeline finishes with failures and is outdated.)