Add artifacts bulk delete
What does this MR do and why?
Feature issue: #33348 (closed)
Rollout issue: #398581 (closed)
This MR removes the ci_job_artifact_bulk_destroy
feature flag to fully enable the bulk delete feature on the artifacts page.
Screenshots or screen recordings
Before | After |
---|---|
artifacts can only be deleted individually | artifacts can be selected using checkboxes and deleted all at once |
How to set up and validate locally
- find/make a project that generates artifacts (one where you have at least the maintainer role)
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']
- run a few pipelines in the project
- navigate to the project, and in the sidebar choose
CI/CD
=>Artifacts
(orBuild
=>Artifacts
in the new sidebar) - checkboxes should appear next to each job (and next to each artifact file within each job) that allow you to select artifacts for deletion
to run tests
# run rspec tests
bundle exec rspec spec/requests/api/graphql/mutations/ci/job_artifact/bulk_destroy_spec.rb
# generate fixture
bundle exec rspec spec/frontend/fixtures/job_artifacts.rb
# run jest tests
yarn install && yarn jest ci/artifacts
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