Commit bcc03064 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'update_extends_docs' into 'master'

Update explanation about the `extends` feature

See merge request gitlab-org/gitlab-ce!22043
parents 74e49d2f 6481b44b
...@@ -102,10 +102,13 @@ rspec: ...@@ -102,10 +102,13 @@ rspec:
- $RSPEC - $RSPEC
``` ```
In the example above, the `rspec` job is going to inherit from the `.tests` In the example above, the `rspec` job inherits from the `.tests` template job.
template job. GitLab will perform a reverse deep merge, which means that it will GitLab will perform a reverse deep merge based on the keys. GitLab will:
merge the `rspec` contents into `.tests` recursively, and this is going to result in
the following `rspec` job: - Merge the `rspec` contents into `.tests` recursively.
- Not merge the values of the keys.
This results in the following `rspec` job:
```yaml ```yaml
rspec: rspec:
...@@ -118,6 +121,11 @@ rspec: ...@@ -118,6 +121,11 @@ rspec:
- $RSPEC - $RSPEC
``` ```
NOTE: **Note:**
Note that `script: rake test` has been overwritten by `script: rake rspec`.
If you do want to include the `rake test`, have a look at [before_script-and-after_script](#before_script-and-after_script).
`.tests` in this example is a [hidden key](#hidden-keys-jobs), but it's `.tests` in this example is a [hidden key](#hidden-keys-jobs), but it's
possible to inherit from regular jobs as well. possible to inherit from regular jobs as well.
......
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