diff options
Diffstat (limited to 'doc/ci/variables/where_variables_can_be_used.md')
-rw-r--r-- | doc/ci/variables/where_variables_can_be_used.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/ci/variables/where_variables_can_be_used.md b/doc/ci/variables/where_variables_can_be_used.md index 8009b1d5e8a..7d3f39a8c19 100644 --- a/doc/ci/variables/where_variables_can_be_used.md +++ b/doc/ci/variables/where_variables_can_be_used.md @@ -89,6 +89,14 @@ Supported: - In `script`, it will work in the following lines of `script`. - In `after_script`, it will work in following lines of `after_script`. +Please notice the specific case of `after_script` scripts, that can: + +- Only use variables defined before the script within the same `after_script` section. +- Not use variables defined in `before_script` and `script`. + +Both restrictions are caused by the fact, that `after_script` script is executed in a +[separated shell context](https://docs.gitlab.com/ee/ci/yaml/README.html#before_script-and-after_script). + ## Persisted variables NOTE: **Note:** |