Filter out jobs with no artifacts
What does this MR do and why?
For #382074 (closed)
This page is behind the artifacts_management_page
feature flag.
This MR filters jobs without artifacts out of the list of jobs that should be shown on the artifacts page.
Screenshots or screen recordings
before | after |
---|---|
![]() |
![]() |
How to set up and validate locally
echo "Feature.enable(:artifacts_management_page)" | bundle exec rails console
git checkout 382074-project-jobs-resolver-filter-by-with-artifacts
- find/make/import a project with a pipeline with a job that generates artifacts
you can use this CI yaml to generate some sample artifacts:
# .gitlab-ci.yml
potato:
stage: build
script:
- echo 'potato' >> potato.txt
artifacts:
expose_as: 'potato'
paths: ['potato.txt']
tomato:
stage: build
script:
- echo 'tomato' >> tomato.txt
artifacts:
expose_as: 'tomato'
paths: ['tomato.txt']
pineapple:
stage: build
script:
- echo 'pineapple' >> pineapple.txt
artifacts:
expose_as: 'pineapple'
paths: ['pineapple.txt']
apple:
stage: build
script:
- echo 'apple' >> apple.txt
artifacts:
expose_as: 'apple'
paths: ['apple.txt']
toblerone:
stage: build
script:
- echo 'toblerone' >> toblerone.txt
artifacts:
expose_as: 'toblerone'
paths: ['toblerone.txt']
- run a pipeline for that project - for this you'll need to set up a local runner for GDK or enable runners in gitpod
- make sure the pipeline contains both a job that generates artifacts and a job that does not generate artifacts
- navigate to the project, and in the sidebar select
CI/CD
=>Artifacts
- only jobs with artifacts should be shown in the list
optional:
- delete all artifacts for a job, the job should then disappear from the list
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Miranda Fluharty