Upload artifacts on execution timeout
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=19818) </details> <!--IssueSummary end--> ### Description ZD: https://gitlab.zendesk.com/agent/tickets/83487 One of our customers is running into issues where a job is being killed due to job timeout: > ``` ERROR: Job failed: execution took longer than 4h0m0s seconds ``` They would like to debug the timeout by investigating the artifacts, using [`artifacts:when`](https://docs.gitlab.com/ce/ci/yaml/#artifacts-when). But the artifacts aren't being uploaded because uploading artifacts should be uploaded within the timeout set in the project settings ### Steps to reproduce - Have a job that runs for a time longer than project `build_timeout` (default 60min): https://docs.gitlab.com/ee/user/project/pipelines/settings.html#timeout - Add `artifacts:when: on_failure` to your `.gitlab-ci.yml` ### Proposal Upload the artifacts **after** the job is being killed by the `build_timeout`. #### Use cases To investigate jobs that are taking too long to complete. ### Feature checklist Make sure these are completed before closing the issue, with a link to the relevant commit. - [ ] [Feature assurance](https://about.gitlab.com/handbook/product/#feature-assurance) - [ ] Documentation - [ ] Added to [features.yml](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/data/features.yml)
issue