The Build
object type represents a build object. atlassian:build
should be used to ingest build-specific fields.
1 2objects {} ├─ schemaVersion (string) [Required] ├─ id (string) [Required] ├─ updateSequenceNumber (long) [Required] ├─ displayName (string) [Required] ├─ description (string) [Optional] ├─ url (string) [Required] ├─ createdAt (Instant (ISO8601 / RFC3339)) [Required] └─ createdBy [] [Optional] ├─ accountId (string) └─ ari (string) └─ lastUpdatedAt (Instant (ISO8601 / RFC3339)) [Required] └─ lastUpdatedBy [] [Required] ├─accountId (string) └─ ari └─ containerKey ()[Optional] ├─ type ├─ value └─ repositoryId └─ permissions └─ accessControls └─ principals └─type └─ associations [] [Optional] ├─ associationType (string) └─ values [] atlassian:build ├─ pipelineId (string) [Required] ├─ buildNumber (integer) [Required] ├─ label (string) [Optional] ├─ state (string) [Required] ├─ duration (integer) [Optional] └─ testInfo [Optional] ├─ totalNumber (integer) [Required] ├─ numberPassed (integer) [Required] ├─ numberFailed (integer) [Required] └─ numberSkipped (integer) [Required] └─ references [] [Optional] └─ commit [Optional] ├─ id (string) [Required] └─ repositoryUri (string) [Required] └─ ref [Optional] ├─ name (string) [Required] └─ uri (string) [Required]
You may send the container repository as a separate entity in the same payload or in a separate request.
Property | Type | Required | Description |
---|---|---|---|
schemaVersion |
| Yes | The schema version of the object. |
id |
| Yes | The ID of the object in the source system. |
updateSequenceNumber | long | Yes | A sequence number to compare when writing to the database. Objects are written following
a last write wins strategy, therefore an object with a greater UpdateSequenceNumber
is considered a more recently updated object. |
displayName | string | Yes | The display name of the object. |
description | string | No | The description of the object. |
url | string | Yes | The URL from the provider which the object is accessible from. |
createdAt | string | Yes |
The date the object was created. Format: Instant (ISO8601 / RFC3339) |
createdBy | user | No |
The user that created the object. See User to learn more. |
lastUpdatedAt | string | Yes |
The date the object was last updated. Format: Instant (ISO8601 / RFC3339) |
lastUpdatedBy | user | No |
The user that last updated the object. See User to learn more. |
owners | list<User> | No | List of users that own the object. |
thumbnail | thumbnail | No |
The thumbnail of the object. See Thumbnail to learn more. |
parentKey | entityKey | No |
The ID of the parent object. If null, it is a standalone object. See Entity key to learn more. |
containerKey | entityKey | Yes |
The container identifier that this object belongs to. See Entity key to learn more. |
permissions | list<Permissions> | Yes |
The permissions configuration of the object. See Permissions to learn more. |
associations | association | No |
List of objects associated with the object. Generally used to link an external object to a Atlassian object. See Association to learn more. |
Property | Type | Required | Description | |
---|---|---|---|---|
pipelineId |
| Yes | An ID that relates a sequence of builds. Depending on the use case, this might be a project ID, pipeline ID, plan key, or whichever logical unit you use to group a sequence of builds. The combination of Maximum length: 255 | |
buildNumber |
| Yes | Identifies a build within the sequence of builds with the same The combination of Format: int64 | |
label | string | No | A human-readable text label that provides information about the build. Maximum length: 255 | |
state | string | Yes |
The state of the build. Allowed values: pending in_progress successful failed cancelled unknown | |
duration | integer | No | The duration of the build in seconds. Format: int64 | |
testInfo | TestInfo | No | Summary of tests executed as part of the build. | |
testInfo.totalNumber |
| Yes |
The total number of tests considered during the build. Format: int32 | |
testInfo.numberPassed |
| Yes |
The number of tests that passed during the build. Format: int32 | |
testInfo.numberFailed |
| Yes |
The number of tests that failed during the build. Format: int32 | |
testInfo.numberSkipped |
| Yes |
The number of tests that were skipped during the build. Format: int32 | |
references | List | No |
The references of the build. Minimum length: 1 Maximum length: 5 | |
references.commit |
| No | ||
references.commit.id |
| Yes |
The ID of the commit. This must be the same as the commit hash. For example, for a Git repository this would be the SHA1 hash. Maximum length: 255 | |
references.commit.
repositoryUri |
| Yes |
An identifier for the repository containing the commit. In most cases, this should be the URL of the repository in the SCM provider. For cases where the build was executed against a local repository, this should be an identifier unique to the repository. | |
references.ref |
| No | ||
references.ref.name |
| Yes |
The name of the reference the build ran on. Maximum length: 255 | |
references.ref.uri |
| Yes |
An identifier for the reference. In most cases this should be the URL of the tag/branch in the SCM provider. For cases where the build was executed against a local repository, this should be an identifier unique to the reference. |
1 2{ "objects" : [ { "schemaVersion" : "2.0", "id" : "pipelineId/my-build-plan/buildId/16", "updateSequenceNumber" : 1, "displayName" : "My Project build #16", "description" : "My Project build #16: Failed", "url" : "https://build.example.com/1", "createdAt" : "2024-07-01T05:00:45Z", "createdBy" : { "externalId" : "external-id-1" }, "lastUpdatedAt" : "2024-07-09T14:27:37.000Z", "lastUpdatedBy" : { "externalId" : "external-id-1" }, "containerKey" : { "type" : "atlassian:repository", "value" : { "repositoryId" : "my-repo-1" } }, "permissions" : [ { "action" : "read", "accessControls" : [ { "principals" : [ { "type" : "EVERYONE" } ] } ] } ], "atlassian:build" : { "pipelineId" : "my-build-plan", "buildNumber" : 16, "label" : "<string>", "duration" : 47, "state" : "failed", "testInfo" : { "totalNumber" : 150, "numberPassed" : 145, "numberFailed" : 5, "numberSkipped" : 0 }, "references" : [ { "commit" : { "id" : "08cd9c26b2b8d7cf6e6af6b49da8895d065c259f", "repositoryUri" : "https://bitbucket.org/myproject/my-repo" }, "ref" : { "name" : "feature/ISSUE-123-some-work", "uri" : "https://bitbucket.org/myproject/my-repo/refs/feature/ISSUE-123-some-work" } } ] } } ], "operationType" : "NORMAL" }
Rate this page: