Build
An individual build.
Attributes
Minimal Representation
Included when the resource is returned as part of another resource.
Name | Type | Description |
---|---|---|
id | Integer | Value uniquely identifying the build. |
number | String | Incremental number for a repository's builds. |
state | String | Current state of the build. |
duration | Integer | Wall clock time in seconds. |
event_type | String | Event that triggered the build. |
previous_state | String | State of the previous build (useful to see if state changed). |
pull_request_title | String | Title of the build's pull request. |
pull_request_number | Integer | Number of the build's pull request. |
started_at | String | When the build started. |
finished_at | String | When the build finished. |
private | Boolean | Whether or not the build is private. |
priority | Unknown | The build's priority. |
Standard Representation
Included when the resource is the main response of a request, or is eager loaded.
Name | Type | Description |
---|---|---|
id | Integer | Value uniquely identifying the build. |
number | String | Incremental number for a repository's builds. |
state | String | Current state of the build. |
duration | Integer | Wall clock time in seconds. |
event_type | String | Event that triggered the build. |
previous_state | String | State of the previous build (useful to see if state changed). |
pull_request_title | String | Title of the build's pull request. |
pull_request_number | Integer | Number of the build's pull request. |
started_at | String | When the build started. |
finished_at | String | When the build finished. |
private | Boolean | Whether or not the build is private. |
priority | Unknown | The build's priority. |
repository | Repository | GitHub user or organization the build belongs to. |
branch | Branch | The branch the build is associated with. |
tag | String | The build's tag. |
commit | Commit | The commit the build is associated with. |
jobs | Jobs | List of jobs that are part of the build's matrix. |
stages | [Stage] | The stages of the build. |
created_by | Owner | The User or Organization that created the build. |
updated_at | String | The last time the build was updated. |
Actions
Find
This returns a single build.
GET
/build/{build.id}
Template Variable | Type | Description |
---|---|---|
build.id | Integer | Value uniquely identifying the build. |
Query Parameter | Type | Description |
---|---|---|
include | [String] | List of attributes to eager load. |
Example:GET /build/86601346
Cancel
This cancels a currently running build. It will set the build
and associated jobs
to "state": "canceled"
.
POST
/build/{build.id}/cancel
Template Variable | Type | Description |
---|---|---|
build.id | Integer | Value uniquely identifying the build. |
Example:POST /build/86601346/cancel
Restart
This restarts a build that has completed or been canceled.
POST
/build/{build.id}/restart
Template Variable | Type | Description |
---|---|---|
build.id | Integer | Value uniquely identifying the build. |
Example:POST /build/86601346/restart
Priority
Document resources/build/actions/priority
not found.
POST
/build/{build.id}/priority
Template Variable | Type | Description |
---|---|---|
build.id | Integer | Value uniquely identifying the build. |
Accepted Parameter | Type | Description |
---|---|---|
build.cancel_all | Unknown | Documentation missing. |
Example:POST /build/86601346/priority