Add kept badge to kept artifacts
What does this MR do and why?
For #370149
Add kept badge to kept artifacts
On the artifacts page for a project (Build
=> Artifacts
),
Display a badge for artifacts that have been kept with an explanatory tooltip
(job.log
s are kept by default, so show different badge styling/tooltip)
Define kept
as artifact.expire_at.nil?
, add that to the GraphQL type
Changelog: added
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- find/make a project that generates artifacts
here's a .gitlab-ci.yml snippet for that:
# .gitlab-ci.yml
fruit:
stage: build
script:
- echo 'banana' >> banana.txt
- echo 'apple' >> apple.txt
artifacts:
paths: ['banana.txt', 'apple.txt']
potato:
stage: build
script:
- echo 'potato' >> potato.txt
artifacts:
paths: ['potato.txt']
- run a pipeline in the project
- navigate to the job log for a job that generated artifacts
- click the
Keep
button in the artifacts section of the job log sidebar - navigate to the artifacts page for the project
- verify that the
Kept
badge is shown next to the artifact files for the job that you kept artifacts for - verify that the
Kept
badge is also shown next to thejob.log
files (these are automatically kept)
Edited by Miranda Fluharty