summaryrefslogtreecommitdiff
path: root/doc/ci/api/builds.md
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-25 18:42:46 -0700
committerDouwe Maan <douwe@gitlab.com>2015-08-25 18:42:46 -0700
commit046b28312704f3131e72dcd2dbdacc5264d4aa62 (patch)
treea8c2b14a6e1db3b662fee2c79af70d9fcb643c2e /doc/ci/api/builds.md
parente449426a4e7d15cdd582d4f136add52cbfb5e04e (diff)
downloadgitlab-ce-046b28312704f3131e72dcd2dbdacc5264d4aa62.tar.gz
Groundwork for merging CI into CE
Diffstat (limited to 'doc/ci/api/builds.md')
-rw-r--r--doc/ci/api/builds.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/ci/api/builds.md b/doc/ci/api/builds.md
new file mode 100644
index 00000000000..54749bc6fa1
--- /dev/null
+++ b/doc/ci/api/builds.md
@@ -0,0 +1,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 /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 /builds/:id
+
+Parameters:
+
+ * `id` (required) - The ID of a project
+ * `state` (optional) - The state of a build
+ * `trace` (optional) - The trace of a build