Persist artifacts before timeout shutdown routine
If you have a bugous build, it may timeout because it is taking too long (and probably retrying internally multiple times).
When we reach a timeout, we simply kill the container, not trying to save any artifact from it. This makes it super hard to try to debug a erratic build. Here is an example: https://gitlab.com/gitlab-org/gitlab/-/jobs/585639117 multiple capybara screenshots were made, but we can't see them because the container was killed before even having the chance to ship any artifact.
Edited by David Dieulivol