Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
d8eeeb69
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,发现更多精彩内容 >>
提交
d8eeeb69
编写于
3月 13, 2016
作者:
A
Achilleas Pipinellis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor dependencies directive
[ci skip]
上级
de7c3316
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
26 addition
and
21 deletion
+26
-21
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+26
-21
未找到文件。
doc/ci/yaml/README.md
浏览文件 @
d8eeeb69
...
...
@@ -236,14 +236,14 @@ job_name:
| Keyword | Required | Description |
|---------------|----------|-------------|
| script | yes | Defines a shell script which is executed by runner |
| stage | no
(default:
`test`
) | Defines a build stage
|
| stage | no
| Defines a build stage (default:
`test`
)
|
| type | no | Alias for
`stage`
|
| only | no | Defines a list of git refs for which build is created |
| except | no | Defines a list of git refs for which build is not created |
| tags | no | Defines a list of tags which are used to select runner |
| allow_failure | no | Allow build to fail. Failed build doesn't contribute to commit status |
| when | no | Define when to run build. Can be
`on_success`
,
`on_failure`
or
`always`
|
| dependencies | no | Define
a builds that this build depends on
|
| dependencies | no | Define
other builds that a build depends on so that you can pass artifacts between them
|
| artifacts | no | Define list build artifacts |
| cache | no | Define list of files that should be cached between subsequent runs |
...
...
@@ -404,7 +404,10 @@ The above script will:
> - Build artifacts are only collected for successful builds.
`artifacts`
is used to specify list of files and directories which should be
attached to build after success. Below are some examples.
attached to build after success. To pass artifacts between different builds,
see
[
dependencies
](
#dependencies
)
.
Below are some examples.
Send all files in
`binaries`
and
`.config`
:
...
...
@@ -524,56 +527,58 @@ job:
>**Note:**
Introduced in GitLab 8.6 and GitLab Runner v1.1.1.
This feature should be used with
`artifacts`
and allows to define artifacts passing between different builds.
This feature should be used in conjunction with
[
`artifacts`
](
#artifacts
)
and
allows you to define the artifacts to pass between different builds.
`artifacts`
from previous stages
are passed by default.
Note that
`artifacts`
from previous
[
stages
](
#stages
)
are passed by default.
To use
a feature define
`dependencies`
in context of the build
and pass
To use
this feature, define
`dependencies`
in context of the job
and pass
a list of all previous builds from which the artifacts should be downloaded.
You can only define a builds from stages that are executed before this one.
Error will be shown if you define builds from current stage or next stages.
You can only define builds from stages that are executed before the current one.
An error will be shown if you define builds from the current stage or next ones.
---
How to use artifacts passing between stages:
In the following example, we define two jobs with artifacts,
`build:osx`
and
`build:linux`
. When the
`test:osx`
is executed, the artifacts from
`build:osx`
will be downloaded and extracted in the context of the build. The same happens
for
`test:linux`
and artifacts from
`build:linux`
.
The job
`deploy`
will download artifacts from all previous builds because of
the
[
stage
](
#stages
)
precedence:
```
build:osx:
stage: build
script:
...
script:
make build:osx
artifacts:
paths:
- binaries/
build:linux:
stage: build
script:
...
script:
make build:linux
artifacts:
paths:
- binaries/
test:osx:
stage: test
script:
...
script:
make test:osx
dependencies:
- build:osx
test:linux:
stage: test
script:
...
script:
make test:linux
dependencies:
- build:linux
deploy:
stage: deploy
script:
...
script:
make deploy
```
The above will create a build artifacts for two jobs:
`build:osx`
and
`build:linux`
.
When executing the
`test:osx`
the artifacts for
`build:osx`
will be downloaded and extracted in context of the build.
The same happens for
`test:linux`
and artifacts from
`build:linux`
.
The job
`deploy`
will download artifacts from all previous builds.
However, only the
`build:osx`
and
`build:linux`
exports artifacts so only these will be downloaded.
### cache
>**Note:**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录