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
Hide 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:
...
@@ -117,12 +117,10 @@ or import additional pipeline configuration:
### `stages`
### `stages`
Use
`stages`
to define stages that contain groups of jobs.
`stages`
is defined globally
Use
`stages`
to define stages that contain groups of jobs. Use
[
`stage`
](
#stage
)
for the pipeline. Use
[
`stage`
](
#stage
)
in a job to define which stage the job is
in a job to configure the job to run in a specific stage.
part of.
If
`stages`
is not defined in the
`.gitlab-ci.yml`
file, then the default
If
`stages`
is not defined in the
`.gitlab-ci.yml`
file, the default pipeline stages are:
pipeline stages are:
-
[
`.pre`
](
#stage-pre
)
-
[
`.pre`
](
#stage-pre
)
-
`build`
-
`build`
...
@@ -130,12 +128,14 @@ pipeline stages are:
...
@@ -130,12 +128,14 @@ pipeline stages are:
-
`deploy`
-
`deploy`
-
[
`.post`
](
#stage-post
)
-
[
`.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 same stage run in parallel.
-
Jobs in the next stage run after the jobs from the previous stage complete successfully.
-
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
```
yaml
stages
:
stages
:
...
@@ -144,6 +144,8 @@ stages:
...
@@ -144,6 +144,8 @@ stages:
-
deploy
-
deploy
```
```
In this example:
1.
All jobs in
`build`
execute in parallel.
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
`build`
succeed, the
`test`
jobs execute in parallel.
1.
If all jobs in
`test`
succeed, the
`deploy`
jobs execute in parallel.
1.
If all jobs in
`test`
succeed, the
`deploy`
jobs execute in parallel.
...
@@ -152,17 +154,17 @@ stages:
...
@@ -152,17 +154,17 @@ stages:
If any job fails, the pipeline is marked as
`failed`
and jobs in later stages do not
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.
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
-
If a job does not specify a
[
`stage`
](
#stage
)
, the job is assigned the
`test`
stage.
useful for
[
compliance pipeline configuration
](
../../user/project/settings/index.md#compliance-pipeline-configuration
)
-
If a stage is defined but no jobs use it, the stage is not visible in the pipeline,
because:
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.
**Related topics**
:
-
The defined stages become visible when developers use them in job definitions.
To make a job start earlier and ignore the stage order, use
-
To make a job start earlier and ignore the stage order, use the
[
`needs`
](
#needs
)
keyword.
the
[
`needs`
](
#needs
)
keyword.
### `workflow`
### `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