Automatically clean-up container after it has run
What does this MR do?
Problem statement
When using a dedicated gitlab-runner according to the instructions given in the documentation at https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html#set-up-a-private-runner-for-code-quality-without-docker-in-docker containers in "Exited" state are left behind and accumulate on the host where that runner was set up.
See the full problem description on the issue here: gitlab-org/gitlab#335963 (closed)
Implemented solution
This MR adds the --rm
option when running the codeclimate container, so that it is automatically removed after execution.
(Note: this is the same solution as implemented here: gitlab-org/gitlab!66910 (merged))
What are the relevant issue numbers?
See gitlab-org/gitlab#335963 (closed)
Todo after merging this MR
- Would need to update GitLab to use the updated version of this container here: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml#L10
Edited by zertrin