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
422a0227
Commit
422a0227
authored
Nov 27, 2020
by
Marcel Amirault
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update details about stages and needs
parent
17bd7b60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+18
-15
No files found.
doc/ci/yaml/README.md
View file @
422a0227
...
...
@@ -197,14 +197,14 @@ karma:
### `stages`
`stages`
is used to define stages that contain jobs and is defined
globally for the pipeline.
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.
The order of the
`stages`
items defines the execution order for jobs:
1.
Jobs in the same stage are run in parallel.
1.
Jobs in the next stage are run after the jobs from the previous stage
complete successfully.
-
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:
...
...
@@ -215,18 +215,21 @@ stages:
-
deploy
```
1.
First, all jobs of
`build`
are executed in parallel.
1.
If all jobs of
`build`
succeed, the
`test`
jobs are executed in parallel.
1.
If all jobs of
`test`
succeed, the
`deploy`
jobs are executed in parallel.
1.
If all jobs of
`deploy`
succeed, the commit is marked as
`passed`
.
1.
If any of the previous jobs fails, the commit is marked as
`failed`
and no
jobs of further stage are executed.
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.
1.
If all jobs in
`deploy`
succeed, the pipeline is marked as
`passed`
.
There are also two edge cases worth mentioning:
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.
1.
If no
`stages`
are defined in
`.gitlab-ci.yml`
, then the
`build`
,
`test`
and
`deploy`
can be used as job's stage by default.
1.
If a job does not specify a
`stage`
, the job is assigned the
`test`
stage.
If no
`stages`
are defined in
`.gitlab-ci.yml`
, then
`build`
,
`test`
and
`deploy`
are the default pipeline stages.
If a job does not specify a
[
`stage`
](
#stage
)
, the job is assigned the
`test`
stage.
To make a job start earlier and ignore the stage order, use
the
[
`needs`
](
#needs
)
keyword.
### `workflow:rules`
...
...
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