diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 18:08:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 18:08:05 +0300 |
commit | f78257cbddd711e18cbce93ad740a4aa0acac347 (patch) | |
tree | 7f018abe3ce1c0010879cc480f348a35e616fabb /doc/ci/yaml | |
parent | f500600a43b531e2e7a5858b74bd35312b02c349 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/ci/yaml')
-rw-r--r-- | doc/ci/yaml/README.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 00b5d5d0d6d..9976a423996 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -158,6 +158,42 @@ rspec 2.6: script: bundle exec rspec ``` +### `inherit` + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/207484) in GitLab 12.9. + +You can disable inheritance of globally defined defaults +and variables with the `inherit:` parameter. + +In the example below: + +- `rubocop` **will** inherit both the `before_script` and the variable `DOMAIN`. +- `rspec` **will not** inherit the `before_script` or the variable `DOMAIN`. +- `capybara` **will** inherit the `before_script`, but **will not** inherit the variable `DOMAIN`. + +```yaml +default: + before_script: + - echo Hello World + +variables: + DOMAIN: example.com + +rubocop: + script: bundle exec rubocop + +rspec: + inherit: + default: false + variables: false + script: bundle exec rspec + +capybara: + inherit: + variables: false + script: bundle exec capybara +``` + ## Parameter details The following are detailed explanations for parameters used to configure CI/CD pipelines. |