BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4e70f251
Commit
4e70f251
authored
Jan 11, 2016
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ./doc/api/builds.md
parent
96bbc145
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
234 additions
and
70 deletions
+234
-70
builds.md
doc/api/builds.md
+232
-69
entities.rb
lib/api/entities.rb
+2
-1
No files found.
doc/api/builds.md
View file @
4e70f251
...
@@ -17,37 +17,97 @@ Parameters:
...
@@ -17,37 +17,97 @@ Parameters:
[
[
{
{
"commit"
:
{
"commit"
:
{
"committed_at"
:
"2015-12-28T14:34:03.814Z"
,
"author_email"
:
"admin@example.com"
,
"id"
:
2
,
"author_name"
:
"Administrator"
,
"ref"
:
null
,
"created_at"
:
"2015-12-24T16:51:14.000+01:00"
,
"sha"
:
"6b053ad388c531c21907f022933e5e81598db388"
"id"
:
"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd"
,
"message"
:
"Test the CI integration."
,
"short_id"
:
"0ff3ae19"
,
"title"
:
"Test the CI integration."
},
},
"created_at"
:
"2016-01-04T15:41:23.147Z"
,
"coverage"
:
null
,
"finished_at"
:
null
,
"created_at"
:
"2015-12-24T15:51:21.802Z"
,
"id"
:
65
,
"download_url"
:
null
,
"name"
:
"brakeman"
,
"finished_at"
:
"2015-12-24T17:54:27.895Z"
,
"id"
:
7
,
"name"
:
"teaspoon"
,
"ref"
:
"master"
,
"ref"
:
"master"
,
"runner"
:
null
,
"runner"
:
null
,
"stage"
:
"test"
,
"stage"
:
"test"
,
"started_at"
:
null
,
"started_at"
:
"2015-12-24T17:54:27.722Z"
,
"status"
:
"pending"
"status"
:
"failed"
,
"tag"
:
false
,
"user"
:
{
"avatar_url"
:
"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"
,
"bio"
:
null
,
"can_create_group"
:
true
,
"can_create_project"
:
true
,
"color_scheme_id"
:
2
,
"created_at"
:
"2015-12-21T13:14:24.077Z"
,
"current_sign_in_at"
:
"2016-01-11T09:31:40.472Z"
,
"email"
:
"admin@example.com"
,
"id"
:
1
,
"identities"
:
[],
"is_admin"
:
true
,
"linkedin"
:
""
,
"name"
:
"Administrator"
,
"projects_limit"
:
100
,
"skype"
:
""
,
"state"
:
"active"
,
"theme_id"
:
3
,
"twitter"
:
""
,
"two_factor_enabled"
:
false
,
"username"
:
"root"
,
"web_url"
:
"http://gitlab.dev/u/root"
,
"website_url"
:
""
}
},
},
{
{
"commit"
:
{
"commit"
:
{
"committed_at"
:
"2015-12-28T14:34:03.814Z"
,
"author_email"
:
"admin@example.com"
,
"id"
:
2
,
"author_name"
:
"Administrator"
,
"ref"
:
null
,
"created_at"
:
"2015-12-24T16:51:14.000+01:00"
,
"sha"
:
"6b053ad388c531c21907f022933e5e81598db388"
"id"
:
"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd"
,
"message"
:
"Test the CI integration."
,
"short_id"
:
"0ff3ae19"
,
"title"
:
"Test the CI integration."
},
},
"created_at"
:
"2016-01-04T15:41:23.046Z"
,
"coverage"
:
null
,
"finished_at"
:
null
,
"created_at"
:
"2015-12-24T15:51:21.727Z"
,
"id"
:
64
,
"download_url"
:
null
,
"name"
:
"rubocop"
,
"finished_at"
:
"2015-12-24T17:54:24.921Z"
,
"id"
:
6
,
"name"
:
"spinach:other"
,
"ref"
:
"master"
,
"ref"
:
"master"
,
"runner"
:
null
,
"runner"
:
null
,
"stage"
:
"test"
,
"stage"
:
"test"
,
"started_at"
:
null
,
"started_at"
:
"2015-12-24T17:54:24.729Z"
,
"status"
:
"pending"
"status"
:
"failed"
,
"tag"
:
false
,
"user"
:
{
"avatar_url"
:
"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"
,
"bio"
:
null
,
"can_create_group"
:
true
,
"can_create_project"
:
true
,
"color_scheme_id"
:
2
,
"created_at"
:
"2015-12-21T13:14:24.077Z"
,
"current_sign_in_at"
:
"2016-01-11T09:31:40.472Z"
,
"email"
:
"admin@example.com"
,
"id"
:
1
,
"identities"
:
[],
"is_admin"
:
true
,
"linkedin"
:
""
,
"name"
:
"Administrator"
,
"projects_limit"
:
100
,
"skype"
:
""
,
"state"
:
"active"
,
"theme_id"
:
3
,
"twitter"
:
""
,
"two_factor_enabled"
:
false
,
"username"
:
"root"
,
"web_url"
:
"http://gitlab.dev/u/root"
,
"website_url"
:
""
}
}
}
]
]
```
```
...
@@ -57,7 +117,7 @@ Parameters:
...
@@ -57,7 +117,7 @@ Parameters:
Get a list of builds for specific commit in a project.
Get a list of builds for specific commit in a project.
```
```
GET /projects/:id/
builds/commit/:sha
GET /projects/:id/
repository/commits/:sha/builds
```
```
Parameters:
Parameters:
...
@@ -67,45 +127,104 @@ Parameters:
...
@@ -67,45 +127,104 @@ Parameters:
-
`scope`
(optional) - The scope of builds to show (one or array of: pending, running, failed, success, canceled; if none provided showing all builds)
-
`scope`
(optional) - The scope of builds to show (one or array of: pending, running, failed, success, canceled; if none provided showing all builds)
```
json
```
json
[
{
```
"commit"
:
{
"committed_at"
:
"2015-12-28T14:34:03.814Z"
,
## Get a single build
"id"
:
2
,
mmit": {
"ref"
:
null
,
"author_email": "admin@example.com",
"sha"
:
"6b053ad388c531c21907f022933e5e81598db388"
"author_name": "Administrator",
"created_at": "2015-12-24T16:51:14.000+01:00",
"id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
"message": "Test the CI integration.",
"short_id": "0ff3ae19",
"title": "Test the CI integration."
},
},
"created_at"
:
"2016-01-04T15:41:23.147Z"
,
"coverage": null,
"finished_at"
:
null
,
"created_at": "2015-12-24T15:51:21.957Z",
"id"
:
65
,
"download_url": null,
"finished_at": "2015-12-24T17:54:33.913Z",
"id": 9,
"name": "brakeman",
"name": "brakeman",
"ref": "master",
"ref": "master",
"runner": null,
"runner": null,
"stage": "test",
"stage": "test",
"started_at"
:
null
,
"started_at": "2015-12-24T17:54:33.727Z",
"status"
:
"pending"
"status": "failed",
"tag": false,
"user": {
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
"bio": null,
"can_create_group": true,
"can_create_project": true,
"color_scheme_id": 2,
"created_at": "2015-12-21T13:14:24.077Z",
"current_sign_in_at": "2016-01-11T09:31:40.472Z",
"email": "admin@example.com",
"id": 1,
"identities":
[
],
"is_admin": true,
"linkedin": "",
"name": "Administrator",
"projects_limit": 100,
"skype": "",
"state": "active",
"theme_id": 3,
"twitter": "",
"two_factor_enabled": false,
"username": "root",
"web_url": "http://gitlab.dev/u/root",
"website_url": ""
}
},
},
{
{
"commit": {
"commit": {
"committed_at"
:
"2015-12-28T14:34:03.814Z"
,
"author_email": "admin@example.com",
"id"
:
2
,
"author_name": "Administrator",
"ref"
:
null
,
"created_at": "2015-12-24T16:51:14.000+01:00",
"sha"
:
"6b053ad388c531c21907f022933e5e81598db388"
"id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd",
"message": "Test the CI integration.",
"short_id": "0ff3ae19",
"title": "Test the CI integration."
},
},
"created_at"
:
"2016-01-04T15:41:23.046Z"
,
"coverage": null,
"finished_at"
:
null
,
"created_at": "2015-12-24T15:51:21.880Z",
"id"
:
64
,
"download_url": null,
"finished_at": "2015-12-24T17:54:31.198Z",
"id": 8,
"name": "rubocop",
"name": "rubocop",
"ref": "master",
"ref": "master",
"runner": null,
"runner": null,
"stage": "test",
"stage": "test",
"started_at"
:
null
,
"started_at": "2015-12-24T17:54:30.733Z",
"status"
:
"pending"
"status": "failed",
"tag": false,
"user": {
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
"bio": null,
"can_create_group": true,
"can_create_project": true,
"color_scheme_id": 2,
"created_at": "2015-12-21T13:14:24.077Z",
"current_sign_in_at": "2016-01-11T09:31:40.472Z",
"email": "admin@example.com",
"id": 1,
"identities":
[
],
"is_admin": true,
"linkedin": "",
"name": "Administrator",
"projects_limit": 100,
"skype": "",
"state": "active",
"theme_id": 3,
"twitter": "",
"two_factor_enabled": false,
"username": "root",
"web_url": "http://gitlab.dev/u/root",
"website_url": ""
}
}
}
]
]
```
## Get a single build
Get a single build of a project
Get a single build of a project
...
@@ -121,20 +240,50 @@ Parameters:
...
@@ -121,20 +240,50 @@ Parameters:
```
json
```
json
{
{
"commit"
:
{
"commit"
:
{
"committed_at"
:
"2015-12-28T14:34:03.814Z"
,
"author_email"
:
"admin@example.com"
,
"id"
:
2
,
"author_name"
:
"Administrator"
,
"ref"
:
null
,
"created_at"
:
"2015-12-24T16:51:14.000+01:00"
,
"sha"
:
"6b053ad388c531c21907f022933e5e81598db388"
"id"
:
"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd"
,
"message"
:
"Test the CI integration."
,
"short_id"
:
"0ff3ae19"
,
"title"
:
"Test the CI integration."
},
},
"created_at"
:
"2016-01-04T15:41:23.046Z"
,
"coverage"
:
null
,
"finished_at"
:
null
,
"created_at"
:
"2015-12-24T15:51:21.880Z"
,
"id"
:
64
,
"download_url"
:
null
,
"finished_at"
:
"2015-12-24T17:54:31.198Z"
,
"id"
:
8
,
"name"
:
"rubocop"
,
"name"
:
"rubocop"
,
"ref"
:
"master"
,
"ref"
:
"master"
,
"runner"
:
null
,
"runner"
:
null
,
"stage"
:
"test"
,
"stage"
:
"test"
,
"started_at"
:
null
,
"started_at"
:
"2015-12-24T17:54:30.733Z"
,
"status"
:
"pending"
"status"
:
"failed"
,
"tag"
:
false
,
"user"
:
{
"avatar_url"
:
"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"
,
"bio"
:
null
,
"can_create_group"
:
true
,
"can_create_project"
:
true
,
"color_scheme_id"
:
2
,
"created_at"
:
"2015-12-21T13:14:24.077Z"
,
"current_sign_in_at"
:
"2016-01-11T09:31:40.472Z"
,
"email"
:
"admin@example.com"
,
"id"
:
1
,
"identities"
:
[],
"is_admin"
:
true
,
"linkedin"
:
""
,
"name"
:
"Administrator"
,
"projects_limit"
:
100
,
"skype"
:
""
,
"state"
:
"active"
,
"theme_id"
:
3
,
"twitter"
:
""
,
"two_factor_enabled"
:
false
,
"username"
:
"root"
,
"web_url"
:
"http://gitlab.dev/u/root"
,
"website_url"
:
""
}
}
}
```
```
...
@@ -154,20 +303,27 @@ Parameters:
...
@@ -154,20 +303,27 @@ Parameters:
```
json
```
json
{
{
"commit"
:
{
"commit"
:
{
"committed_at"
:
"2015-12-28T14:34:03.814Z"
,
"author_email"
:
"admin@example.com"
,
"id"
:
2
,
"author_name"
:
"Administrator"
,
"ref"
:
null
,
"created_at"
:
"2015-12-24T16:51:14.000+01:00"
,
"sha"
:
"6b053ad388c531c21907f022933e5e81598db388"
"id"
:
"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd"
,
"message"
:
"Test the CI integration."
,
"short_id"
:
"0ff3ae19"
,
"title"
:
"Test the CI integration."
},
},
"created_at"
:
"2016-01-05T15:33:25.936Z"
,
"coverage"
:
null
,
"finished_at"
:
"2016-01-05T15:33:47.553Z"
,
"created_at"
:
"2016-01-11T10:13:33.506Z"
,
"id"
:
66
,
"download_url"
:
null
,
"finished_at"
:
"2016-01-11T10:14:09.526Z"
,
"id"
:
69
,
"name"
:
"rubocop"
,
"name"
:
"rubocop"
,
"ref"
:
"master"
,
"ref"
:
"master"
,
"runner"
:
null
,
"runner"
:
null
,
"stage"
:
"test"
,
"stage"
:
"test"
,
"started_at"
:
null
,
"started_at"
:
null
,
"status"
:
"canceled"
"status"
:
"canceled"
,
"tag"
:
false
,
"user"
:
null
}
}
```
```
...
@@ -187,19 +343,26 @@ Parameters:
...
@@ -187,19 +343,26 @@ Parameters:
```
json
```
json
{
{
"commit"
:
{
"commit"
:
{
"committed_at"
:
"2015-12-28T14:34:03.814Z"
,
"author_email"
:
"admin@example.com"
,
"id"
:
2
,
"author_name"
:
"Administrator"
,
"ref"
:
null
,
"created_at"
:
"2015-12-24T16:51:14.000+01:00"
,
"sha"
:
"6b053ad388c531c21907f022933e5e81598db388"
"id"
:
"0ff3ae198f8601a285adcf5c0fff204ee6fba5fd"
,
"message"
:
"Test the CI integration."
,
"short_id"
:
"0ff3ae19"
,
"title"
:
"Test the CI integration."
},
},
"created_at"
:
"2016-01-05T15:33:25.936Z"
,
"coverage"
:
null
,
"created_at"
:
"2016-01-11T10:13:33.506Z"
,
"download_url"
:
null
,
"finished_at"
:
null
,
"finished_at"
:
null
,
"id"
:
6
6
,
"id"
:
6
9
,
"name"
:
"rubocop"
,
"name"
:
"rubocop"
,
"ref"
:
"master"
,
"ref"
:
"master"
,
"runner"
:
null
,
"runner"
:
null
,
"stage"
:
"test"
,
"stage"
:
"test"
,
"started_at"
:
null
,
"started_at"
:
null
,
"status"
:
"pending"
"status"
:
"pending"
,
"tag"
:
false
,
"user"
:
null
}
}
```
```
lib/api/entities.rb
View file @
4e70f251
...
@@ -375,8 +375,9 @@ module API
...
@@ -375,8 +375,9 @@ module API
end
end
class
Build
<
Grape
::
Entity
class
Build
<
Grape
::
Entity
expose
:id
,
:status
,
:stage
,
:name
,
:ref
,
:tag
,
:coverage
,
:user
expose
:id
,
:status
,
:stage
,
:name
,
:ref
,
:tag
,
:coverage
expose
:created_at
,
:started_at
,
:finished_at
expose
:created_at
,
:started_at
,
:finished_at
expose
:user
,
with:
UserFull
expose
:download_url
do
|
repo_obj
,
options
|
expose
:download_url
do
|
repo_obj
,
options
|
if
options
[
:user_can_download_artifacts
]
if
options
[
:user_can_download_artifacts
]
repo_obj
.
download_url
repo_obj
.
download_url
...
...
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