Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
4773c6a4
Commit
4773c6a4
authored
Sep 07, 2017
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify yaml hidden keys (jobs)
parent
6f004242
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+17
-11
No files found.
doc/ci/yaml/README.md
View file @
4773c6a4
...
...
@@ -1366,25 +1366,31 @@ variables:
GIT_DEPTH
:
"
3"
```
## Hidden keys
## Hidden keys
(jobs)
> Introduced in GitLab 8.6 and GitLab Runner v1.1.1.
Keys that start with a dot (
`.`
) will be not processed by GitLab CI. You can
use this feature to ignore jobs, or use the
[
special YAML features
](
#special-yaml-features
)
and transform the hidden keys
into templates.
If you want to temporarily 'disable' a job, rather than commenting out all the
lines where the job is defined:
```
#hidden_job:
# script:
# - run test
```
In the following example,
`.key_name`
will be ignored:
you can instead start its name with a dot (
`.`
) and it will not be processed by
GitLab CI. In the following example,
`.hidden_job`
will be ignored:
```
yaml
.
key_name
:
.
hidden_job
:
script
:
-
r
ake spec
-
r
un test
```
Hidden keys can be hashes like normal CI jobs, but you are also allowed to use
different types of structures to leverage special YAML features.
Use this feature to ignore jobs, or use the
[
special YAML features
](
#special-yaml-features
)
and transform the hidden keys
into templates.
## Special YAML features
...
...
@@ -1400,7 +1406,7 @@ Read more about the various [YAML features](https://learnxinyminutes.com/docs/ya
YAML has a handy feature called 'anchors', which lets you easily duplicate
content across your document. Anchors can be used to duplicate/inherit
properties, and is a perfect example to be used with
[
hidden keys
](
#hidden-keys
)
properties, and is a perfect example to be used with
[
hidden keys
](
#hidden-keys
-jobs
)
to provide templates for your jobs.
The following example uses anchors and map merging. It will create two jobs,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment