summaryrefslogtreecommitdiff
path: root/doc/ci/api/builds.md
blob: 3b5008ccdb47eab1d94ceef85f574d304fb71728 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Builds API

This API used by runners to receive and update builds.

__Authentication is done by runner token__

## Builds

### Runs oldest pending build by runner

    POST /ci/builds/register

Parameters:

  * `token` (required) - The unique token of runner

Returns:

```json
{
  "id" : 79,
  "commands" : "",
  "path" : "",
  "ref" : "",
  "sha" : "",
  "project_id" : 6,
  "repo_url" : "git@demo.gitlab.com:gitlab/gitlab-shell.git",
  "before_sha" : ""
}
```


### Update details of an existing build

    PUT /ci/builds/:id

Parameters:

  * `id` (required) - The ID of a project
  * `state` (optional) - The state of a build
  * `trace` (optional) - The trace of a build