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
9c7393b4
Commit
9c7393b4
authored
Feb 05, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the pipelines documentation with the latest rules
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
fc7eba33
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
65 deletions
+113
-65
.gitlab-ci.yml
.gitlab-ci.yml
+0
-1
doc/development/pipelines.md
doc/development/pipelines.md
+113
-64
No files found.
.gitlab-ci.yml
View file @
9c7393b4
...
@@ -3,7 +3,6 @@ image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.1
...
@@ -3,7 +3,6 @@ image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.1
stages
:
stages
:
-
sync
-
sync
-
prepare
-
prepare
-
quick-test
-
test
-
test
-
post-test
-
post-test
-
review-prepare
-
review-prepare
...
...
doc/development/pipelines.md
View file @
9c7393b4
...
@@ -19,9 +19,6 @@ The current stages are:
...
@@ -19,9 +19,6 @@ The current stages are:
<https://gitlab.com/gitlab-org/gitlab-foss>
.
<https://gitlab.com/gitlab-org/gitlab-foss>
.
-
`prepare`
: This stage includes jobs that prepare artifacts that are needed by
-
`prepare`
: This stage includes jobs that prepare artifacts that are needed by
jobs in subsequent stages.
jobs in subsequent stages.
-
`quick-test`
: This stage includes test jobs that should run first and fail the
pipeline early (currently used to run Geo tests when the branch name starts
with
`geo-`
,
`geo/`
, or ends with
`-geo`
).
-
`test`
: This stage includes most of the tests, DB/migration jobs, and static analysis jobs.
-
`test`
: This stage includes most of the tests, DB/migration jobs, and static analysis jobs.
-
`post-test`
: This stage includes jobs that build reports or gather data from
-
`post-test`
: This stage includes jobs that build reports or gather data from
the
`test`
stage's jobs (e.g. coverage, Knapsack metadata etc.).
the
`test`
stage's jobs (e.g. coverage, Knapsack metadata etc.).
...
@@ -138,54 +135,109 @@ duplicating the `if` conditions and `changes` patterns lists since they cannot b
...
@@ -138,54 +135,109 @@ duplicating the `if` conditions and `changes` patterns lists since they cannot b
**
If you update an
`if`
condition or
`changes`
**
If you update an
`if`
condition or
`changes`
patterns list, make sure to mass-update those across all the CI config files (i.e.
`.gitlab/ci/*.yml`
).
**
patterns list, make sure to mass-update those across all the CI config files (i.e.
`.gitlab/ci/*.yml`
).
**
### Canonical
commi
ts only
### Canonical
/security namespace merge reques
ts only
This condition limits jobs creation to commits under the
`gitlab-org/`
top-level group
This condition limits jobs creation to merge requests under the
`gitlab-org/`
top-level group
on GitLab.com only. This is similar to the
`.only:variables-canonical-dot-com`
CI definition:
on GitLab.com only (i.e. this won't run for
`master`
, stable or auto-deploy branches).
This is similar to the
`.only:variables-canonical-dot-com`
+
`only:refs: [merge_requests]`
CI definitions.
```
yaml
The definition for
`if-canonical-dot-com-gitlab-org-groups-merge-request`
can be
.if-canonical-gitlab
:
&if-canonical-gitlab
seen in
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/docs.gitlab-ci.yml>
.
if
:
'
$CI_SERVER_HOST
==
"gitlab.com"
&&
$CI_PROJECT_NAMESPACE
=~
/^gitlab-org($|\/)/'
```
### Canonical
merge request
s only
### Canonical
/security namespace tag
s only
Same as the "Canonical commits only" condition above but further limits jobs creation
This condition limits jobs creation to tags under the
`gitlab-org/`
top-level group
to merge requests only (i.e. this won't run for
`master`
, stable or auto-deploy branches).
on GitLab.com only.
This is similar to the
`.only:variables-canonical-dot-com`
+
`.except:refs-master-tags-stable-deploy`
This is similar to the
`.only:variables-canonical-dot-com`
+
`only:refs: [tags]`
CI definition:
CI definitions:
```
yaml
The definition for
`if-canonical-dot-com-gitlab-org-groups-tag`
can be seen in
.if-canonical-gitlab-merge-request
:
&if-canonical-gitlab-merge-request
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/cng.gitlab-ci.yml>
.
if
:
'
$CI_SERVER_HOST
==
"gitlab.com"
&&
$CI_PROJECT_NAMESPACE
=~
/^gitlab-org($|\/)/
&&
$CI_MERGE_REQUEST_IID'
```
### Canonical namespace `master` only
This condition limits jobs creation to
`master`
pipelines for the
`gitlab-org`
top-level group
on GitLab.com only.
This is similar to the
`.only:variables-canonical-dot-com`
+
`only:refs: [master]`
CI definition:
The definition for
`if-canonical-dot-com-gitlab-org-group-master-refs`
can be
seen in
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/pages.gitlab-ci.yml>
.
### Canonical namespace schedules only
This condition limits jobs creation to scheduled pipelines for the
`gitlab-org`
top-level group
on GitLab.com only.
This is similar to the
`.only:variables-canonical-dot-com`
+
`only:refs: [schedules]`
CI definition:
The definition for
`if-canonical-dot-com-gitlab-org-group-schedule`
can be seen
in
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/qa.gitlab-ci.yml>
.
### Not canonical/security namespace
This condition matches if the project isn't in the canonical/security namespace.
Useful to
**not**
create a job if the project is a fork, or in other words, when
a job should only run in the canonical projects.
The definition for
`if-not-canonical-namespace`
can be seen in
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml>
.
### Not EE
This condition matches if the project isn't EE. Useful to
**not**
create a job if
the project is GitLab, or in other words, when a job should only run in the GitLab
FOSS project.
The definition for
`if-not-ee`
can be seen in
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml>
.
### Default refs only
This condition is the equivalent of
`.default-only`
.
The definition for
`if-default-refs`
can be seen in
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml>
.
### `master` refs only
This condition is the equivalent of
`only:refs: [master]`
.
The definition for
`if-master-refs`
can be seen in
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml>
.
### Code changes patterns
### Code changes patterns
Similar patterns as for
`.only:changes-code`
:
Similar patterns as for
`.only:changes-code`
:
```
yaml
The definition for
`code-patterns`
can be seen in
.code-patterns
:
&code-patterns
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/qa.gitlab-ci.yml>
.
-
...
```
### QA changes patterns
### QA changes patterns
Similar patterns as for
`.only:changes-qa`
:
Similar patterns as for
`.only:changes-qa`
:
```
yaml
The definition for
`qa-patterns`
can be seen in
.qa-patterns
:
&qa-patterns
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/qa.gitlab-ci.yml>
.
-
...
```
### Docs changes patterns
Similar patterns as for
`.only:changes-docs`
:
The definition for
`docs-patterns`
can be seen in
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/docs.gitlab-ci.yml>
.
### Code and QA changes patterns
### Code and QA changes patterns
Similar patterns as for
`.only:changes-code-qa`
:
Similar patterns as for
`.only:changes-code-qa`
:
```
yaml
The definition for
`code-qa-patterns`
can be seen in
.code-qa-patterns
:
&code-qa-patterns
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/review.gitlab-ci.yml>
.
-
...
```
### Code, backstage and QA changes patterns
Similar patterns as for
`.only:changes-code-backstage-qa`
:
The definition for
`code-backstage-qa-patterns`
can be seen in
<https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml>
.
## Directed acyclic graph
## Directed acyclic graph
...
@@ -195,21 +247,21 @@ execute jobs out of order for the following jobs:
...
@@ -195,21 +247,21 @@ execute jobs out of order for the following jobs:
```
mermaid
```
mermaid
graph RL;
graph RL;
A[setup-test-env];
A[setup-test-env];
B["gitlab:assets:compile pull-push-cache<br/>(master only)"];
B["gitlab:assets:compile pull-push-cache<br/>(
canonical
master only)"];
C[
gitlab:assets:compile pull-cache
];
C[
"gitlab:assets:compile pull-cache<br/>(canonical default refs only)"
];
D["cache gems<br/>(master and tags only)"];
D["cache gems<br/>(master and tags only)"];
E[review-build-cng];
E[review-build-cng];
F[build-qa-image];
F[build-qa-image];
G[review-deploy];
G[review-deploy];
G2["schedule:review-deploy<br/>(master only)"];
G2["schedule:review-deploy<br/>(master only)"];
H[karma
];
I["karma, jest, webpack-dev-server, static-analysis"
];
I
[jest
];
I
2["karma-foss, jest-foss<br/>(EE default refs only)"
];
J["compile-assets pull-push-cache<br/>(master only)"];
J["compile-assets pull-push-cache<br/>(master only)"];
J2["compile-assets pull-push-cache foss<br/>(EE master only)"];
K[compile-assets pull-cache];
K[compile-assets pull-cache];
L[webpack-dev-server
];
K2["compile-assets pull-cache foss<br/>(EE default refs only)"
];
M[coverage];
M[coverage];
N[pages];
N["pages (master only)"];
O[static-analysis];
Q[package-and-qa];
Q[package-and-qa];
S["RSpec<br/>(e.g. rspec unit pg9)"]
S["RSpec<br/>(e.g. rspec unit pg9)"]
T[retrieve-tests-metadata];
T[retrieve-tests-metadata];
...
@@ -220,58 +272,55 @@ subgraph "`prepare` stage"
...
@@ -220,58 +272,55 @@ subgraph "`prepare` stage"
C
C
F
F
K
K
K2
J
J
J2
T
T
end
end
subgraph "`test` stage"
subgraph "`test` stage"
D --> |needs| A;
D -.-> |needs| A;
H -.-> |needs and depends on| A;
H -.-> |needs and depends on| K;
I -.-> |needs and depends on| A;
I -.-> |needs and depends on| A;
I -.-> |needs and depends on| K;
I -.-> |needs and depends on| K;
I2 -.-> |needs and depends on| A;
I2 -.-> |needs and depends on| K;
L -.-> |needs and depends on| A;
L -.-> |needs and depends on| A;
L -.-> |needs and depends on| K;
O -.-> |needs and depends on| A;
O -.-> |needs and depends on| K;
S -.-> |needs and depends on| A;
S -.-> |needs and depends on| A;
S -.-> |needs and depends on| K;
S -.-> |needs and depends on| K;
S -.-> |needs and depends on| T;
S -.-> |needs and depends on| T;
downtime_check --> |needs and depends on
| A;
L["db:*, gitlab:setup, graphql-docs-verify, downtime_check"] -.-> |needs
| A;
db:* --> |needs| A;
end
gitlab:setup --> |needs| A;
downtime_check --> |needs and depends on| A;
subgraph "`post-test` stage"
graphql-docs-verify --> |needs| A;
M --> |happens after| S
end
end
subgraph "`review-prepare` stage"
subgraph "`review-prepare` stage"
E --> |needs| C;
E -
.
-> |needs| C;
X["schedule:review-build-cng<br/>(master schedule only)"] -
-> |needs| C;
E2["schedule:review-build-cng<br/>(master schedule only)"] -.
-> |needs| C;
end
end
subgraph "`review` stage"
subgraph "`review` stage"
G
G
--> |happens after| E
G2
G2
--> |happens after| E2
end
end
subgraph "`qa` stage"
subgraph "`qa` stage"
Q --> |needs| C;
Q -.-> |needs| C;
Q --> |needs| F;
Q -.-> |needs| F;
review-qa-smoke -.-> |needs and depends on| G;
QA1["review-qa-smoke, review-qa-all, review-performance, dast"] -.-> |needs and depends on| G;
review-qa-all -.-> |needs and depends on| G;
QA2["schedule:review-performance<br/>(master only)"] -.-> |needs and depends on| G2;
review-performance -.-> |needs and depends on| G;
X2["schedule:review-performance<br/>(master only)"] -.-> |needs and depends on| G2;
dast -.-> |needs and depends on| G;
end
end
subgraph "`post-
test
` stage"
subgraph "`post-
qa
` stage"
M
PQA1["parallel-spec-reports"] -.-> |depends on `review-qa-all`| QA1;
end
end
subgraph "`pages` stage"
subgraph "`pages` stage"
N -.-> |depends on| C;
N -.-> |depends on| C;
N -.-> |depends on
| H
;
N -.-> |depends on
karma| I
;
N -.-> |depends on| M;
N -.-> |depends on| M;
N --> |happens after| PQA1
end
end
```
```
...
...
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