Use DestroyBatchService when erasing build trace and job artifacts
What does this MR do and why?
Use DestroyBatchService to delete job artifacts in JobsController#erase and API projects/:id/jobs/:job_id/erase
.
This is to make all job artifacts deletion consistent, using DestroyBatchService
, regardless where the deletion is initiated.
How to set up and validate locally
- Create a project with pipeline that generates artifact and run the pipeline once.
test-job:
script:
- echo "test" > output.txt
artifacts:
paths:
- output.txt
- Go to the job page and click on "Erase job log and artifacts"
- Validate that the job log and artifacts have been erased, with a record of the user and timestamp.
- Do the same through the API
POST: /api/v4/projects/:id/jobs/:job_id/erase
and validate.
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.
Related to #369132 (closed)
Edited by Albert