From d3c39d031338efaf2d7a8ef1e99b7133bef5c9ec Mon Sep 17 00:00:00 2001 From: Rakhman Musoyev <rmusoyev@gitlab.com> Date: Mon, 10 Mar 2025 12:53:25 -0400 Subject: [PATCH] Clarify artifact retention for multiple pipelines on same commit --- doc/ci/jobs/job_artifacts.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/doc/ci/jobs/job_artifacts.md b/doc/ci/jobs/job_artifacts.md index 6e29447977bb1..5336a98e5df35 100644 --- a/doc/ci/jobs/job_artifacts.md +++ b/doc/ci/jobs/job_artifacts.md @@ -383,20 +383,15 @@ With this configuration, GitLab adds **artifact 1** as a link to `file.txt` to t {{< /history >}} -By default artifacts are always kept for successful pipelines for the most recent commit on each ref. -Any [`expire_in`](#with-an-expiry) configuration does not apply to the most recent artifacts. +By default, artifacts are always kept for the most recent successful pipeline on each ref. Any `expire_in` configuration does not apply to the most recent artifacts. -A pipeline's artifacts are only deleted according to the `expire_in` configuration -if a new pipeline runs for the same ref and: +When a new pipeline on the same ref completes successfully, the previous pipeline's artifacts are deleted according to the `expire_in` configuration. The artifacts of the new pipeline are kept automatically. + +A pipeline’s artifacts are only deleted according to the `expire_in` configuration if a new pipeline runs for the same ref and: - Succeeds. -- Fails. - Stops running due to being blocked by a manual job. -Additionally, artifacts are kept for the ref's last successful pipeline even if it -is not the latest pipeline. As a result, if a new pipeline run fails, the last successful pipeline's -artifacts are still kept. - Keeping the latest artifacts can use a large amount of storage space in projects with a lot of jobs or large artifacts. If the latest artifacts are not needed in a project, you can disable this behavior to save space: -- GitLab