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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
616281f6
Commit
616281f6
authored
Feb 29, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CI API docs for builds endpoint for runners
[ci skip]
parent
d24d806e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
64 deletions
+42
-64
doc/ci/api/README.md
doc/ci/api/README.md
+1
-1
doc/ci/api/builds.md
doc/ci/api/builds.md
+41
-63
No files found.
doc/ci/api/README.md
View file @
616281f6
...
@@ -10,6 +10,6 @@ you will find all relevant information.
...
@@ -10,6 +10,6 @@ you will find all relevant information.
## Resources
## Resources
-
[
Builds
](
builds.md
)
-
[
Runners
](
runners.md
)
-
[
Runners
](
runners.md
)
-
[
Commits
](
commits.md
)
-
[
Commits
](
commits.md
)
-
[
Builds
](
builds.md
)
doc/ci/api/builds.md
View file @
616281f6
# Builds API
# Builds API
This
API used by runners to receive and update builds.
API used by runners to receive and update builds.
__Authentication is done by runner token__
_
**Note:**
This API is intended to be used only by Runners as their own
communication channel. For the consumer API see the
[
Builds API
](
../../api/builds.md
)
._
## Authentication
Unique runner token is required to authenticate. You can provide build token
using a
`token`
parameter, or by sending
`BUILD-TOKEN`
header that contains it.
`token`
parameter and
`BUILD-TOKEN`
header can be interchangeable.
## Builds
## Builds
### Runs oldest pending build by runner
### Runs oldest pending build by runner
POST /
ci/
builds/register
POST /builds/register
Parameters:
Parameters:
*
`token`
(required) - The unique token of runner
*
`token`
(required) - The unique token of runner
Returns:
```
json
{
"id"
:
48584
,
"ref"
:
"0.1.1"
,
"tag"
:
true
,
"sha"
:
"d63117656af6ff57d99e50cc270f854691f335ad"
,
"status"
:
"success"
,
"name"
:
"pages"
,
"token"
:
"9dd60b4f1a439d1765357446c1084c"
,
"stage"
:
"test"
,
"project_id"
:
479
,
"project_name"
:
"test"
,
"commands"
:
"echo commands"
,
"repo_url"
:
"http://gitlab-ci-token:token@gitlab.example/group/test.git"
,
"before_sha"
:
"0000000000000000000000000000000000000000"
,
"allow_git_fetch"
:
false
,
"options"
:
{
"image"
:
"docker:image"
,
"artifacts"
:
{
"paths"
:
[
"public"
]
},
"cache"
:
{
"paths"
:
[
"vendor"
]
}
},
"timeout"
:
3600
,
"variables"
:
[
{
"key"
:
"CI_BUILD_TAG"
,
"value"
:
"0.1.1"
,
"public"
:
true
}
],
"depends_on_builds"
:
[
{
"id"
:
48584
,
"ref"
:
"0.1.1"
,
"tag"
:
true
,
"sha"
:
"d63117656af6ff57d99e50cc270f854691f335ad"
,
"status"
:
"success"
,
"name"
:
"build"
,
"token"
:
"9dd60b4f1a439d1765357446c1084c"
,
"stage"
:
"build"
,
"project_id"
:
479
,
"project_name"
:
"test"
,
"artifacts_file"
:
{
"filename"
:
"artifacts.zip"
,
"size"
:
0
}
}
]
}
```
### Update details of an existing build
### Update details of an existing build
PUT /
ci/
builds/:id
PUT /builds/:id
Parameters:
Parameters:
*
`id`
(required) - The ID of a project
*
`id`
(required) - The ID of a project
*
`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
POST /builds/:id/artifacts
Parameters:
*
`id`
(required) - The ID of a build
*
`token`
(required) - The build authorization token
*
`file`
(required) - Artifacts file
### Download the artifacts file from build
GET /builds/:id/artifacts
Parameters:
*
`id`
(required) - The ID of a build
*
`token`
(required) - The build authorization token
### Remove the artifacts file from build
DELETE /builds/:id/artifacts
Parameters:
*
` id`
(required) - The ID of a build
*
`token`
(required) - The build authorization token
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