WIP: Allow to skip containers cleanup when running locally
What does this MR do?
Introduces a new -skip-cleanup
flag for the exec
command. This is to be used when executing builds locally, to aid debugging a failed build, using the same environment as the build.
Why was this MR needed?
Debugging a failed build can be hard if you don't understand the internals of Docker and how gitlab-runner uses it. With this flag, it should be much easier to a container with all attached volumes from the previously failed build.
Are there points in the code the reviewer needs to double check?
- name of the flag
- should we perhaps move it to the docker namespace, as this is only for the docker executor?
Does this MR meet the acceptance criteria?
-
Documentation created/updated -
Added tests for this feature/bug -
In case of conflicts with master
- branch was rebased