Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
e7b36a1f
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e7b36a1f
编写于
9月 03, 2019
作者:
E
Evan Read
提交者:
Achilleas Pipinellis
9月 03, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clarify limits for needs keyword
上级
8326e84e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
25 deletion
+22
-25
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+22
-25
未找到文件。
doc/ci/yaml/README.md
浏览文件 @
e7b36a1f
...
...
@@ -1801,7 +1801,8 @@ and bring back the old behavior.
### `needs`
> Introduced in GitLab 12.2.
> - Introduced in GitLab 12.2.
> - In GitLab 12.3, maximum number of jobs in `needs` array raised from five to 50.
The
`needs:`
keyword enables executing jobs out-of-order, allowing you to implement
a
[
directed acyclic graph
](
../directed_acyclic_graph/index.md
)
in your
`.gitlab-ci.yml`
.
...
...
@@ -1852,30 +1853,26 @@ This example creates three paths of execution:
#### Requirements and limitations
1.
If
`needs:`
is set to point to a job that is not instantiated
because of
`only/except`
rules or otherwise does not exist, the
job will fail.
1.
Note that on day one of the launch, we are temporarily limiting the
maximum number of jobs that a single job can need in the
`needs:`
array. Track
our
[
infrastructure issue
](
https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/7541
)
for details on the current limit.
1.
If you use
`dependencies:`
with
`needs:`
, it's important that you
do not mark a job as having a dependency on something that won't
have been run at the time it needs it. It's better to use both
keywords in this case so that GitLab handles the ordering appropriately.
1.
It is impossible for now to have
`needs: []`
(empty needs),
the job always needs to depend on something, unless this is the job
in the first stage (see
[
gitlab-ce#65504
](
https://gitlab.com/gitlab-org/gitlab-ce/issues/65504
)
).
1.
If
`needs:`
refers to a job that is marked as
`parallel:`
.
the current job will depend on all parallel jobs created.
1.
`needs:`
is similar to
`dependencies:`
in that it needs to use jobs from
prior stages, meaning it is impossible to create circular
dependencies or depend on jobs in the current stage (see
[
gitlab-ce#65505
](
https://gitlab.com/gitlab-org/gitlab-ce/issues/65505
)
).
1.
Related to the above, stages must be explicitly defined for all jobs
that have the keyword
`needs:`
or are referred to by one.
1.
For self-managed users, the feature must be turned on using the
`ci_dag_support`
feature flag. The
`ci_dag_limit_needs`
option, if set, will limit the number of
jobs that a single job can need to
`50`
. If unset, the limit is
`5`
.
-
If
`needs:`
is set to point to a job that is not instantiated
because of
`only/except`
rules or otherwise does not exist, the
pipeline will be created with YAML error.
-
We are temporarily limiting the maximum number of jobs that a single job can
need in the
`needs:`
array:
-
For GitLab.com, the limit is five. For more information, see our
[
infrastructure issue
](
https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/7541
)
.
-
For self-managed instances, the limit is:
-
Five by default (
`ci_dag_limit_needs`
feature flag is enabled).
-
50 if the
`ci_dag_limit_needs`
feature flag is disabled.
-
It is impossible for now to have
`needs: []`
(empty needs),
the job always needs to depend on something, unless this is the job
in the first stage (see
[
gitlab-ce#65504
](
https://gitlab.com/gitlab-org/gitlab-ce/issues/65504
)
).
-
If
`needs:`
refers to a job that is marked as
`parallel:`
.
the current job will depend on all parallel jobs created.
-
`needs:`
is similar to
`dependencies:`
in that it needs to use jobs from
prior stages, meaning it is impossible to create circular
dependencies or depend on jobs in the current stage (see
[
gitlab-ce#65505
](
https://gitlab.com/gitlab-org/gitlab-ce/issues/65505
)
).
-
Related to the above, stages must be explicitly defined for all jobs
that have the keyword
`needs:`
or are referred to by one.
### `coverage`
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录