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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
59bb9f08
Commit
59bb9f08
authored
Nov 08, 2021
by
Marcel Amirault
Committed by
Suzanne Selhorn
Nov 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update default keyword and adjust yaml reference
parent
28dcc1b7
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
112 additions
and
90 deletions
+112
-90
doc/ci/jobs/index.md
doc/ci/jobs/index.md
+14
-0
doc/ci/quick_start/index.md
doc/ci/quick_start/index.md
+1
-1
doc/ci/yaml/includes.md
doc/ci/yaml/includes.md
+1
-1
doc/ci/yaml/index.md
doc/ci/yaml/index.md
+93
-85
doc/ci/yaml/script.md
doc/ci/yaml/script.md
+1
-1
doc/development/cicd/templates.md
doc/development/cicd/templates.md
+2
-2
No files found.
doc/ci/jobs/index.md
View file @
59bb9f08
...
@@ -82,6 +82,20 @@ For example:
...
@@ -82,6 +82,20 @@ For example:
![
Pipeline mini graph sorting
](
img/pipelines_mini_graph_sorting.png
)
![
Pipeline mini graph sorting
](
img/pipelines_mini_graph_sorting.png
)
## Unavailable names for jobs
You can't use these keywords as job names:
-
`image`
-
`services`
-
`stages`
-
`types`
-
`before_script`
-
`after_script`
-
`variables`
-
`cache`
-
`include`
## Group jobs in a pipeline
## Group jobs in a pipeline
If you have many similar jobs, your
[
pipeline graph
](
../pipelines/index.md#visualize-pipelines
)
becomes long and hard
If you have many similar jobs, your
[
pipeline graph
](
../pipelines/index.md#visualize-pipelines
)
becomes long and hard
...
...
doc/ci/quick_start/index.md
View file @
59bb9f08
...
@@ -141,7 +141,7 @@ The pipeline starts when the commit is committed.
...
@@ -141,7 +141,7 @@ The pipeline starts when the commit is committed.
-
You can also use
[
CI/CD configuration visualization
](
../pipeline_editor/index.md#visualize-ci-configuration
)
to
-
You can also use
[
CI/CD configuration visualization
](
../pipeline_editor/index.md#visualize-ci-configuration
)
to
view a graphical representation of your
`.gitlab-ci.yml`
file.
view a graphical representation of your
`.gitlab-ci.yml`
file.
-
Each job contains scripts and stages:
-
Each job contains scripts and stages:
-
The
[
`default`
](
../yaml/index.md#
custom-default-keyword-values
)
keyword is for
-
The
[
`default`
](
../yaml/index.md#
default
)
keyword is for
custom defaults, for example with
[
`before_script`
](
../yaml/index.md#before_script
)
custom defaults, for example with
[
`before_script`
](
../yaml/index.md#before_script
)
and
[
`after_script`
](
../yaml/index.md#after_script
)
.
and
[
`after_script`
](
../yaml/index.md#after_script
)
.
-
[
`stage`
](
../yaml/index.md#stage
)
describes the sequential execution of jobs.
-
[
`stage`
](
../yaml/index.md#stage
)
describes the sequential execution of jobs.
...
...
doc/ci/yaml/includes.md
View file @
59bb9f08
...
@@ -69,7 +69,7 @@ You can include an array of configuration files:
...
@@ -69,7 +69,7 @@ You can include an array of configuration files:
## Use `default` configuration from an included configuration file
## Use `default` configuration from an included configuration file
You can define a
[
`default`
](
index.md#
custom-default-keyword-values
)
section in a
You can define a
[
`default`
](
index.md#
default
)
section in a
configuration file. When you use a
`default`
section with the
`include`
keyword, the defaults apply to
configuration file. When you use a
`default`
section with the
`include`
keyword, the defaults apply to
all jobs in the pipeline.
all jobs in the pipeline.
...
...
doc/ci/yaml/index.md
View file @
59bb9f08
This diff is collapsed.
Click to expand it.
doc/ci/yaml/script.md
View file @
59bb9f08
...
@@ -62,7 +62,7 @@ job:
...
@@ -62,7 +62,7 @@ job:
## Set a default `before_script` or `after_script` for all jobs
## Set a default `before_script` or `after_script` for all jobs
You can use
[
`before_script`
](
index.md#before_script
)
and
[
`after_script`
](
index.md#after_script
)
You can use
[
`before_script`
](
index.md#before_script
)
and
[
`after_script`
](
index.md#after_script
)
with
[
`default`
](
index.md#
custom-default-keyword-values
)
:
with
[
`default`
](
index.md#
default
)
:
-
Use
`before_script`
with
`default`
to define a default array of commands that
-
Use
`before_script`
with
`default`
to define a default array of commands that
should run before the
`script`
commands in all jobs.
should run before the
`script`
commands in all jobs.
...
...
doc/development/cicd/templates.md
View file @
59bb9f08
...
@@ -60,7 +60,7 @@ don't have any other `.gitlab-ci.yml` files.
...
@@ -60,7 +60,7 @@ don't have any other `.gitlab-ci.yml` files.
When authoring pipeline templates:
When authoring pipeline templates:
-
Place any
[
global keywords
](
../../ci/yaml/index.md#global-keywords
)
like
`image`
-
Place any
[
global keywords
](
../../ci/yaml/index.md#global-keywords
)
like
`image`
or
`before_script`
in a
[
`default`
](
../../ci/yaml/index.md#
custom-default-keyword-values
)
or
`before_script`
in a
[
`default`
](
../../ci/yaml/index.md#
default
)
section at the top of the template.
section at the top of the template.
-
Note clearly in the
[
code comments
](
#explain-the-template-with-comments
)
if the
-
Note clearly in the
[
code comments
](
#explain-the-template-with-comments
)
if the
template is designed to be used with the
`includes`
keyword in an existing
template is designed to be used with the
`includes`
keyword in an existing
...
@@ -77,7 +77,7 @@ other pipeline configuration.
...
@@ -77,7 +77,7 @@ other pipeline configuration.
When authoring job templates:
When authoring job templates:
-
Do not use
[
global
](
../../ci/yaml/index.md#global-keywords
)
or
[
`default`
](
../../ci/yaml/index.md#
custom-default-keyword-values
)
-
Do not use
[
global
](
../../ci/yaml/index.md#global-keywords
)
or
[
`default`
](
../../ci/yaml/index.md#
default
)
keywords. When a root
`.gitlab-ci.yml`
includes a template, global or default keywords
keywords. When a root
`.gitlab-ci.yml`
includes a template, global or default keywords
might be overridden and cause unexpected behavior. If a job template requires a
might be overridden and cause unexpected behavior. If a job template requires a
specific stage, explain in the code comments that users must manually add the stage
specific stage, explain in the code comments that users must manually add the stage
...
...
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