Skip to content
Snippets Groups Projects

Resolve "Ensure after_script is called for timed out pipelines"

All threads resolved!
+ 3
2
@@ -1120,8 +1120,9 @@ Scripts you specify in `after_script` execute in a new shell, separate from any
@@ -1120,8 +1120,9 @@ Scripts you specify in `after_script` execute in a new shell, separate from any
immediately becomes invalid if the job is canceled. See [issue](https://gitlab.com/gitlab-org/gitlab/-/issues/473376)
immediately becomes invalid if the job is canceled. See [issue](https://gitlab.com/gitlab-org/gitlab/-/issues/473376)
for more details.
for more details.
If a job times out, the `after_script` commands do not execute.
For jobs that time out:
[An issue exists](https://gitlab.com/gitlab-org/gitlab/-/issues/15603) to add support for executing `after_script` commands for timed-out jobs.
- `after_script` commands do not execute by default.
 
- You can [configure timeout values](../runners/configure_runners.md#ensuring-after_script-execution) to ensure `after_script` runs by setting appropriate `RUNNER_SCRIPT_TIMEOUT` and `RUNNER_AFTER_SCRIPT_TIMEOUT` values that don't exceed the job's timeout.
For `after_script` to be run, the total of `RUNNER_SCRIPT_TIMEOUT` + `RUNNER_AFTER_SCRIPT_TIMEOUT` must not exceed the job's configured timeout.
For `after_script` to be run, the total of `RUNNER_SCRIPT_TIMEOUT` + `RUNNER_AFTER_SCRIPT_TIMEOUT` must not exceed the job's configured timeout.
Loading