Skip to content

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?

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 same ref 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 to job_artifacts

What are the relevant issue numbers?

#19208 (moved)

Edited by Suganthi

Merge request reports