Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
74b96326
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,发现更多精彩内容 >>
提交
74b96326
编写于
3月 01, 2016
作者:
G
Grzegorz Bizon
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update format of documentation for CI API
上级
ec7c6a08
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
40 addition
and
23 deletion
+40
-23
doc/ci/api/builds.md
doc/ci/api/builds.md
+19
-9
doc/ci/api/runners.md
doc/ci/api/runners.md
+21
-14
未找到文件。
doc/ci/api/builds.md
浏览文件 @
74b96326
...
@@ -8,35 +8,45 @@ communication channel. For the consumer API see the
...
@@ -8,35 +8,45 @@ communication channel. For the consumer API see the
## Authentication
## Authentication
Unique runner token is required to authenticate. You can provide build token
This API uses two types of authentication:
using a
`token`
parameter, or by sending
`BUILD-TOKEN`
header that contains it.
`token`
parameter and
`BUILD-TOKEN`
header can be interchangeable.
1.
Unique runner's token
Token assigned to runner after it has been registered.
2.
Using build authorization token
This is project's CI token that can be found in Continuous Integration
project settings.
Build authorization token can be passed as a parameter or a value of
`BUILD-TOKEN` header. This method are interchangeable.
## Builds
## Builds
### Runs oldest pending build by runner
### Runs oldest pending build by runner
POST /builds/register
POST /
ci/api/v1/
builds/register
Parameters:
Parameters:
*
`token`
(required) -
The unique token of runner
*
`token`
(required) -
Unique runner token
### Update details of an existing build
### Update details of an existing build
PUT /builds/:id
PUT /
ci/api/v1/
builds/:id
Parameters:
Parameters:
*
`id`
(required) - The ID of a project
*
`id`
(required) - The ID of a project
*
`token`
(required) - Unique runner token
*
`state`
(optional) - The state of a build
*
`state`
(optional) - The state of a build
*
`trace`
(optional) - The trace of a build
*
`trace`
(optional) - The trace of a build
### Upload artifacts to build
### Upload artifacts to build
POST /builds/:id/artifacts
POST /
ci/api/v1/
builds/:id/artifacts
Parameters:
Parameters:
...
@@ -46,7 +56,7 @@ Parameters:
...
@@ -46,7 +56,7 @@ Parameters:
### Download the artifacts file from build
### Download the artifacts file from build
GET /builds/:id/artifacts
GET /
ci/api/v1/
builds/:id/artifacts
Parameters:
Parameters:
...
@@ -55,7 +65,7 @@ Parameters:
...
@@ -55,7 +65,7 @@ Parameters:
### Remove the artifacts file from build
### Remove the artifacts file from build
DELETE /builds/:id/artifacts
DELETE /
ci/api/v1/
builds/:id/artifacts
Parameters:
Parameters:
...
...
doc/ci/api/runners.md
浏览文件 @
74b96326
# Runners API
# Runners API
API used by runners to register and delete
it
selves.
API used by runners to register and delete
them
selves.
_
**Note:**
This API is intended to be used only by Runners as their own
_
**Note:**
This API is intended to be used only by Runners as their own
communication channel. For the consumer API see the
communication channel. For the consumer API see the
[
new Runners API
](
../../api/runners.md
)
._
[
new Runners API
](
../../api/runners.md
)
._
## Authentication
This API uses two types of authentication:
1.
Unique runner's token
Token assigned to runner after it has been registered.
2.
Using runners' registration token
This is a token that can be found in project's settings.
It can be also found in Admin area » Runners settings.
There are two types of tokens you can pass - shared runner registration
token or project specific registration token.
## Runners
## Runners
### Register a new runner
### Register a new runner
__
Authentication is done with a shared runner registration token or a project
specific runner registration token.__
Used to make GitLab CI aware of available runners.
Used to make GitLab CI aware of available runners.
POST /runners/register
POST /
ci/api/v1/
runners/register
Parameters:
Parameters:
*
`token`
(required) -
The registration token.
*
`token`
(required) -
Registration token
It is 2 types of token you can pass here.
1.
Shared runner registration token
2.
Project specific registration token
### Delete a runner
### Delete a runner
__Authentication is done by using runner token.__
Used to remove runner.
Used to remove runner.
DELETE /runners/delete
DELETE /
ci/api/v1/
runners/delete
Parameters:
Parameters:
*
`token`
(required) -
The runner token.
*
`token`
(required) -
Unique runner token
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录