Interface RepositoryBuildStatus
public interface RepositoryBuildStatus
A build result associated with a commit in a repository.
- Since:
- 7.6
-
Method Summary
Modifier and TypeMethodDescriptionAn identifier for the specific run that resulted in this build status.Returns the commit this build status is attached to.The date tha the build status was first created.A human readable description of the build that was run.getKey()
The key representing the build.getName()
A human readable name of the build that was run.The key of the parent plan for this build.getRef()
The fully qualified ref that the build is associated with.The repository that the build is associated with.getState()
The outcome of the build (BuildState.SUCCESSFUL
orBuildState.FAILED
orBuildState.INPROGRESS
if the build hasn't completed yet.A high level summary of which tests passed and failed.The date that the build status for this repository, commitId and key was last updated.getUrl()
A url to this build in the CI tool that ran it, so that users are able to navigate there for more information.
-
Method Details
-
getBuildNumber
An identifier for the specific run that resulted in this build status. For example, in Bamboo the URL to a build might be https://my-bamboo-url.com/browse/PROJ-PLAN123-5 for the 5th run of the PLAN123 branch plan of the parent plan PLAN in the project PROJ. In this case the build number would be '5'.- Returns:
- the build number if one exists, or
Optional.empty()
otherwise
-
getBuildServer
- Returns:
- the build server that posted this build status, if known,
Optional.empty()
otherwise - Since:
- 7.8
-
getCommit
Returns the commit this build status is attached to. This will not be present in build statuses created using the build status rest API (instead of the repository build status rest API).- Returns:
- the commit associated with the build, if there is one,
Optional.empty()
otherwise - Since:
- 7.8
-
getCommitId
- Returns:
- the commit ID that the build ran against
-
getBuildStatusLinks
- Returns:
- all external links associated with the build status
- Since:
- 7.8
-
getCreatedDate
The date tha the build status was first created. If the build status is subsequently updated (e.g. to change the state from INPROGRESS to SUCCESSFUL, the created date will remain the same but thegetUpdatedDate()
will change.- Returns:
- the date that the build status was first created
-
getDescription
A human readable description of the build that was run.- Returns:
- the description of the build that this build status represents, or
Optional.empty()
if none exists
-
getDuration
- Returns:
- the duration of the build in ms, or
null
if the duration is not provided - Since:
- 7.8
-
getKey
The key representing the build. The key should be a unique identifier when combined with the repository and the commit ID. For example, in Bamboo the URL to a build might be https://my-bamboo-url.com/browse/PROJ-PLAN123-5 for the 5th run of the PLAN123 branch plan of the parent plan PLAN in the project PROJ. In this case, the key would be PROJ-PLAN123- Returns:
- the build key
-
getName
A human readable name of the build that was run.- Returns:
- the name of the build, or
Optional.empty()
is none exists
-
getParent
The key of the parent plan for this build. For example, in Bamboo the URL to a build might be https://my-bamboo-url.com/browse/PROJ-PLAN123-5 for the 5th run of the PLAN123 branch plan of the parent plan PLAN in the project PROJ. In this case, the parent key would be PROJ-PLAN (where as the key would be PROJ-PLAN123).- Returns:
- the identifier for the parent of the plan or job that produced this build status, if there is one,
Optional.empty()
otherwise
-
getRef
The fully qualified ref that the build is associated with.- Returns:
- the branch or tag that this build result is associated with, or
Optional.empty()
if the CI tool did not provide one
-
getRepository
The repository that the build is associated with.- Returns:
- the repository for this build status
-
getState
The outcome of the build (BuildState.SUCCESSFUL
orBuildState.FAILED
orBuildState.INPROGRESS
if the build hasn't completed yet.- Returns:
- the
BuildState
-
getTestResults
A high level summary of which tests passed and failed.- Returns:
- the
TestResults
for the build, if there are any,Optional.empty()
otherwise
-
getUpdatedDate
The date that the build status for this repository, commitId and key was last updated.- Returns:
- the date this build status was last updated
-
getUrl
A url to this build in the CI tool that ran it, so that users are able to navigate there for more information.- Returns:
- a link to the build
-