Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab FOSS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab FOSS
Commits
6481b44b
An error occurred while fetching merge requests data.
Commit
6481b44b
authored
6 years ago
by
Ronald van Zon
Committed by
Achilleas Pipinellis
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update explanation about the `extends` feature
parent
74e49d2f
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/ci/yaml/README.md
+12
-4
12 additions, 4 deletions
doc/ci/yaml/README.md
with
12 additions
and
4 deletions
doc/ci/yaml/README.md
+
12
−
4
View file @
6481b44b
...
...
@@ -102,10 +102,13 @@ rspec:
-
$RSPEC
```
In the example above, the
`rspec`
job is going to inherit from the
`.tests`
template job. GitLab will perform a reverse deep merge, which means that it will
merge the
`rspec`
contents into
`.tests`
recursively, and this is going to result in
the following
`rspec`
job:
In the example above, the
`rspec`
job inherits from the
`.tests`
template job.
GitLab will perform a reverse deep merge based on the keys. GitLab will:
-
Merge the
`rspec`
contents into
`.tests`
recursively.
-
Not merge the values of the keys.
This results in the following
`rspec`
job:
```
yaml
rspec
:
...
...
@@ -118,6 +121,11 @@ 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
possible to inherit from regular jobs as well.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment