summaryrefslogtreecommitdiff
path: root/doc/api/builds.md
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-07-21 18:28:33 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-07-21 18:28:33 +0800
commit83975914337d1dc05193a83d27be577c5631f801 (patch)
treeaeaf2450cb8a8a1c99b064d7d353e28d682c0b65 /doc/api/builds.md
parente3ce02300bf90451b98479720d1093afe8b7eea8 (diff)
parent4211f50014faebf027fd2bc80e0cf1d3f012627c (diff)
downloadgitlab-ce-83975914337d1dc05193a83d27be577c5631f801.tar.gz
Merge branch 'artifacts-from-ref-and-build-name-api' into artifacts-from-ref-and-build-name
* artifacts-from-ref-and-build-name-api: (384 commits) Add API documentation for downloading the latest successful build Since it's too hard to use JOIN with Rails... feedback: Workaround MySQL with INNER JOIN: Just put setup directly in the test, feedback: Cleanup the use of let, feedback: Lose unneeded instance variables and variables, feedback: Add link to user profile to commit avatar (!5163) It's not longer than 80 chars Make sure there's a build Use the same logic, it should specify that it's not logged in Use 'when logging as guest' for context, feedback: Cleanup that a bit Refactor service settings view Fix a problem with processing a pipeline where stage only has manual actions Rename user2 to reporter_user Should check against `authorize_read_builds!` A CHANGELOG entry Don't show other actions of the same name Use limit parameter rather than hardcoded value Reuse those two methods ...
Diffstat (limited to 'doc/api/builds.md')
-rw-r--r--doc/api/builds.md38
1 files changed, 36 insertions, 2 deletions
diff --git a/doc/api/builds.md b/doc/api/builds.md
index 2adea11247e..443739ff845 100644
--- a/doc/api/builds.md
+++ b/doc/api/builds.md
@@ -283,6 +283,40 @@ Response:
[ce-2893]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2893
+## Download the artifacts file
+
+> [Introduced][ce-5347] in GitLab 8.10.
+
+Download the artifacts file from the given reference name and job provided the
+build finished successfully.
+
+```
+GET /projects/:id/artifacts/:ref_name/download?job=name
+```
+
+Parameters
+
+| Attribute | Type | Required | Description |
+|-------------|---------|----------|-------------------------- |
+| `id` | integer | yes | The ID of a project |
+| `ref_name` | string | yes | The ref from a repository |
+| `job` | string | yes | The name of the job |
+
+Example request:
+
+```
+curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/artifacts/master/download?job=test"
+```
+
+Example response:
+
+| Status | Description |
+|-----------|---------------------------------|
+| 200 | Serves the artifacts file |
+| 404 | Build not found or no artifacts |
+
+[ce-5347]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347
+
## Get a trace file
Get a trace of a specific build of a project
@@ -409,7 +443,7 @@ POST /projects/:id/builds/:build_id/erase
Parameters
-| Attribute | Type | required | Description |
+| Attribute | Type | Required | Description |
|-------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project |
| `build_id` | integer | yes | The ID of a build |
@@ -459,7 +493,7 @@ POST /projects/:id/builds/:build_id/artifacts/keep
Parameters
-| Attribute | Type | required | Description |
+| Attribute | Type | Required | Description |
|-------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project |
| `build_id` | integer | yes | The ID of a build |