Commit 546e63a3 authored by Jonston Chan's avatar Jonston Chan

Incorporate suggestions from Marcel Amirault

parent 91741dd0
......@@ -292,6 +292,12 @@ Scripts specified in `after_script` are executed in a new shell, separate from a
- Command aliases and variables exported in `script` scripts.
- Changes outside of the working tree (depending on the Runner executor), like
software installed by a `before_script` or `script` script.
- Have a separate timeout.
- The timeout is hard coded to 5 minutes, see
[related issue](https://gitlab.com/gitlab-org/gitlab-runner/issues/2716).
- Do not affect the job's exit code nor the pipeline.
- If the `script` section succeeds and the `after_script` times out or fails,
the job will exit with code `0` (`Job Succeeded`).
It's possible to overwrite a globally defined `before_script` or `after_script`
if you set it per-job:
......@@ -310,17 +316,6 @@ job:
- execute this after my script
```
NOTE: **Note:**
`after_script` has a hard-coded timeout of 5 minutes.
See the [Allow configurable after_script timeouts proposal](https://gitlab.com/gitlab-org/gitlab-runner/issues/2716)
for updates.
NOTE: **Note:**
The `after_script` timeout does not affect the job's exit code.
If the `script` section succeeds and the `after_script` times out, the job will
still exit with exit code 0 (success). This does not trigger `retry: when: always`.
The pipeline also continues as though no failures have been encountered.
#### YAML anchors for `before_script` and `after_script`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/23005) in GitLab 12.5.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment