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
8efe5a95
Commit
8efe5a95
authored
Nov 08, 2021
by
Marcel Amirault
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update stages keyword to use new style
parent
ed5e81a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
doc/ci/yaml/index.md
doc/ci/yaml/index.md
+17
-15
No files found.
doc/ci/yaml/index.md
View file @
8efe5a95
...
...
@@ -117,12 +117,10 @@ or import additional pipeline configuration:
### `stages`
Use
`stages`
to define stages that contain groups of jobs.
`stages`
is defined globally
for the pipeline. Use
[
`stage`
](
#stage
)
in a job to define which stage the job is
part of.
Use
`stages`
to define stages that contain groups of jobs. Use
[
`stage`
](
#stage
)
in a job to configure the job to run in a specific stage.
If
`stages`
is not defined in the
`.gitlab-ci.yml`
file, then the default
pipeline stages are:
If
`stages`
is not defined in the
`.gitlab-ci.yml`
file, the default pipeline stages are:
-
[
`.pre`
](
#stage-pre
)
-
`build`
...
...
@@ -130,12 +128,14 @@ pipeline stages are:
-
`deploy`
-
[
`.post`
](
#stage-post
)
The order of the
`stages`
items
defines the execution order for jobs:
The order of the
items in
`stages`
defines the execution order for jobs:
-
Jobs in the same stage run in parallel.
-
Jobs in the next stage run after the jobs from the previous stage complete successfully.
For example:
**Keyword type**
: Global keyword.
**Example of `stages`:**
```
yaml
stages
:
...
...
@@ -144,6 +144,8 @@ stages:
-
deploy
```
In this example:
1.
All jobs in
`build`
execute in parallel.
1.
If all jobs in
`build`
succeed, the
`test`
jobs execute in parallel.
1.
If all jobs in
`test`
succeed, the
`deploy`
jobs execute in parallel.
...
...
@@ -152,17 +154,17 @@ stages:
If any job fails, the pipeline is marked as
`failed`
and jobs in later stages do not
start. Jobs in the current stage are not stopped and continue to run.
If a job does not specify a
[
`stage`
](
#stage
)
, the job is assigned the
`test`
stage.
**Additional details**
:
If a stage is defined, but no jobs use it, the stage is not visible in the pipeline. This is
useful for
[
compliance pipeline configuration
](
../../user/project/settings/index.md#compliance-pipeline-configuration
)
because:
-
If a job does not specify a
[
`stage`
](
#stage
)
, the job is assigned the
`test`
stage.
-
If a stage is defined but no jobs use it, the stage is not visible in the pipeline,
which can help
[
compliance pipeline configurations
](
../../user/project/settings/index.md#compliance-pipeline-configuration
)
:
-
Stages can be defined in the compliance configuration but remain hidden if not used.
-
The defined stages become visible when developers use them in job definitions.
-
Stages can be defined in the compliance configuration but remain hidden if not used.
-
The defined stages become visible when developers use them in job definitions.
**Related topics**
:
To make a job start earlier and ignore the stage order, use
the
[
`needs`
](
#needs
)
keyword.
-
To make a job start earlier and ignore the stage order, use the
[
`needs`
](
#needs
)
keyword.
### `workflow`
...
...
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