diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /doc/ci/yaml/includes.md | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'doc/ci/yaml/includes.md')
-rw-r--r-- | doc/ci/yaml/includes.md | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/doc/ci/yaml/includes.md b/doc/ci/yaml/includes.md index 838710834ba..5158f80ea64 100644 --- a/doc/ci/yaml/includes.md +++ b/doc/ci/yaml/includes.md @@ -289,10 +289,10 @@ smoke-test-job: In `include` sections in your `.gitlab-ci.yml` file, you can use: -- [Project variables](../variables/index.md#add-a-cicd-variable-to-a-project) -- [Group variables](../variables/index.md#add-a-cicd-variable-to-a-group) -- [Instance variables](../variables/index.md#add-a-cicd-variable-to-an-instance) -- Project [predefined variables](../variables/predefined_variables.md) +- [Project variables](../variables/index.md#add-a-cicd-variable-to-a-project). +- [Group variables](../variables/index.md#add-a-cicd-variable-to-a-group). +- [Instance variables](../variables/index.md#add-a-cicd-variable-to-an-instance). +- Project [predefined variables](../variables/predefined_variables.md). - In GitLab 14.2 and later, the `$CI_COMMIT_REF_NAME` [predefined variable](../variables/predefined_variables.md). When used in `include`, the `CI_COMMIT_REF_NAME` variable returns the full @@ -322,7 +322,11 @@ include: file: '.compliance-gitlab-ci.yml' ``` -For an example of how you can include these predefined variables, and the variables' impact on CI/CD jobs, +You cannot use variables defined in jobs, or in a global [`variables`](../yaml/index.md#variables) +section which defines the default variables for all jobs. Includes are evaluated before jobs, +so these variables cannot be used with `include`. + +For an example of how you can include predefined variables, and the variables' impact on CI/CD jobs, see this [CI/CD variable demo](https://youtu.be/4XR8gw3Pkos). ## Use `rules` with `include` |