Commit f9e91f21 authored by Evan Read's avatar Evan Read

Merge branch 'mo-update-artifact-documentation' into 'master'

Update artifacts documentation

See merge request gitlab-org/gitlab!60637
parents cfbab336 3f7bb18f
...@@ -173,9 +173,8 @@ https://gitlab.com/gitlab-org/gitlab/-/jobs/artifacts/master/file/htmlcov/index. ...@@ -173,9 +173,8 @@ https://gitlab.com/gitlab-org/gitlab/-/jobs/artifacts/master/file/htmlcov/index.
## When job artifacts are deleted ## When job artifacts are deleted
By default, the latest job artifacts from the most recent successful jobs are never deleted. See the [`expire_in`](../yaml/README.md#artifactsexpire_in) documentation for information on when
If a job is configured with [`expire_in`](../yaml/README.md#artifactsexpire_in), job artifacts are deleted.
its artifacts only expire if a more recent artifact exists.
### Keep artifacts from most recent successful jobs ### Keep artifacts from most recent successful jobs
......
...@@ -17,4 +17,5 @@ Pipeline artifacts are saved to disk or object storage. They count towards a pro ...@@ -17,4 +17,5 @@ Pipeline artifacts are saved to disk or object storage. They count towards a pro
## When pipeline artifacts are deleted ## When pipeline artifacts are deleted
The latest artifacts for refs are locked against deletion, and kept regardless of the expiry time. See the [`expire_in`](../yaml/README.md#artifactsexpire_in) documentation for information on when
pipeline artifacts are deleted.
...@@ -3320,25 +3320,25 @@ Files matched by [`artifacts:untracked`](#artifactsuntracked) can be excluded us ...@@ -3320,25 +3320,25 @@ Files matched by [`artifacts:untracked`](#artifactsuntracked) can be excluded us
#### `artifacts:expire_in` #### `artifacts:expire_in`
Use `expire_in` to specify how long artifacts are active before they > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/16267) in GitLab 13.0 behind a disabled feature flag, the latest job artifacts are kept regardless of expiry time.
expire and are deleted. > - [Made default behavior](https://gitlab.com/gitlab-org/gitlab/-/issues/229936) in GitLab 13.4.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/241026) in GitLab 13.8, keeping latest job artifacts can be disabled at the project level.
The expiration time period begins when the artifact is uploaded and > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276583) in GitLab 13.9, keeping latest job artifacts can be disabled instance-wide.
stored on GitLab. If the expiry time is not defined, it defaults to the > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/321323) in GitLab 13.12, the latest pipeline artifacts are kept regardless of expiry time.
[instance wide setting](../../user/admin_area/settings/continuous_integration.md#default-artifacts-expiration)
(30 days by default). Use `expire_in` to specify how long [job artifacts](../pipelines/job_artifacts.md) are stored before
they expire and are deleted. The `expire_in` setting does not affect:
To override the expiration date and protect artifacts from being automatically deleted:
- Artifacts from the latest job, unless this keeping the latest job artifacts is:
- Use the **Keep** button on the job page. - [Disabled at the project level](../pipelines/job_artifacts.md#keep-artifacts-from-most-recent-successful-jobs).
- Set the value of `expire_in` to `never`. [Available](https://gitlab.com/gitlab-org/gitlab/-/issues/22761) - [Disabled instance-wide](../../user/admin_area/settings/continuous_integration.md#keep-the-latest-artifacts-for-all-jobs-in-the-latest-successful-pipelines).
in GitLab 13.3 and later. - [Pipeline artifacts](../pipelines/pipeline_artifacts.md). It's not possible to specify an
expiration date for these:
After their expiry, artifacts are deleted hourly by default (via a cron job), - Pipeline artifacts from the latest pipeline are kept forever.
and are not accessible anymore. - Other pipeline artifacts are erased after one week.
The value of `expire_in` is an elapsed time in seconds, unless a unit is The value of `expire_in` is an elapsed time in seconds, unless a unit is provided. Valid values
provided. Examples of valid values: include:
- `'42'` - `'42'`
- `42 seconds` - `42 seconds`
...@@ -3350,7 +3350,7 @@ provided. Examples of valid values: ...@@ -3350,7 +3350,7 @@ provided. Examples of valid values:
- `3 weeks and 2 days` - `3 weeks and 2 days`
- `never` - `never`
To expire artifacts 1 week after being uploaded: To expire artifacts one week after being uploaded:
```yaml ```yaml
job: job:
...@@ -3358,12 +3358,19 @@ job: ...@@ -3358,12 +3358,19 @@ job:
expire_in: 1 week expire_in: 1 week
``` ```
The latest artifacts for refs are locked against deletion, and kept regardless of The expiration time period begins when the artifact is uploaded and stored on GitLab. If the expiry
the expiry time. [Introduced in](https://gitlab.com/gitlab-org/gitlab/-/issues/16267) time is not defined, it defaults to the
GitLab 13.0 behind a disabled feature flag, and [made the default behavior](https://gitlab.com/gitlab-org/gitlab/-/issues/229936) [instance wide setting](../../user/admin_area/settings/continuous_integration.md#default-artifacts-expiration)
in GitLab 13.4. (30 days by default).
To override the expiration date and protect artifacts from being automatically deleted:
- Use the **Keep** button on the job page.
- [In GitLab 13.3 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/22761), set the value of
`expire_in` to `never`.
In [GitLab 13.8 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/241026), you can [disable this behavior at the project level in the CI/CD settings](../pipelines/job_artifacts.md#keep-artifacts-from-most-recent-successful-jobs). In [GitLab 13.9 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/276583), you can [disable this behavior instance-wide](../../user/admin_area/settings/continuous_integration.md#keep-the-latest-artifacts-for-all-jobs-in-the-latest-successful-pipelines). After their expiry, artifacts are deleted hourly by default (using a cron job), and are not
accessible anymore.
#### `artifacts:expose_as` #### `artifacts:expose_as`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment