Interface ImmutableResultsSummary
- All Superinterfaces:
BambooIdProvider,Comparable<ImmutableResultsSummary>,ResultStatisticsProvider
- All Known Subinterfaces:
BuildResultsSummary,ChainResultsSummary,ImmutableChainResultsSummary,MutableBuildKeyResultsSummary,ResultsSummary
- All Known Implementing Classes:
AbstractResultsSummary,BaseResultSummary,BuildResultsSummaryImpl,ChainResultsSummaryImpl,ImmutableResultsSummaryImpl
public interface ImmutableResultsSummary
extends BambooIdProvider, ResultStatisticsProvider, Comparable<ImmutableResultsSummary>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<ArtifactLink>Returns all artifacts associated with this build.Deprecated.since 4.3@Nullable LongThe id of the latest agent that built the result@Nullable AgentTypeThe type of the latest agent that built the result@Nullable DateWhen the build was cancelled@Nullable DateWhen the build finishedFormatted buildDate.@NotNull Stringcom.google.common.collect.ImmutableList<Commit>List of commits associated with the build represented by this summaryCustom data map to store random metadata about the buildGets theDeltaStateof the summary.longDuration of the build in milliseconds@NotNull StringReturns the duration in a "pretty" format.@NotNull Set<LinkedJiraIssue>Return JIRA issues that this build result summary fixes@NotNull String@NotNull ImmutableChainGets theImmutableChainthat this result belongs to (directly or not)@NotNull ImmutablePlanGets theImmutablePlanthat this result directly belongs to.Returns all the JIRA issue keys linked to this build result@NotNull Set<LinkedJiraIssue>Returns all the JIRA issues linked to this build resultTags / labels associated with the buildA shortcut method to get all of the label names from the labellings@Nullable LongReturns the size of log associated with this result.Deprecated.since 5.15 for internal use only, useResultsSummaryVariableAccessorinstead@NotNull Optional<? extends ImmutablePlan>Gets theImmutablePlanthat this result directly belongs to.@NotNull PlanKeyFull key of the plan.@NotNull String@NotNull PlanResultKeyGets thePlanResultKeyfor thisImmutableResultsSummarylongDuration of actual build processing in milisecondsReturns the processing duration in a "pretty" format.@Nullable DateWhen the build queued@NotNull Set<LinkedJiraIssue>Returns JIRA issues that are related to this build result.getRelativeBuildDate(Date comparedTo) Returns the relative started time (duration) compared to current dategetRelativeBuildStartedDate(Date comparedTo) Returns the relative started time (duration) compared to date passed as parametergetRelativeQueueDate(Date comparedTo) @NotNull List<RepositoryChangeset>intReturn the number of build restart attempts@NotNull List<ConsumedSubscription>Returns list of consumed artifact dependenciesConsumedSubscription@NotNull List<VariableSubstitution>Deprecated.since 5.15 without replacement, returns empty list for any result created by Bamboo 5.15 or later@NotNull TestResultsSummary@NotNull String@Nullable LongA stored version of how long (milli seconds) it took for this build to fix a failure.@NotNull TriggerReasonWhy the build was was triggeredA shortcut method to get the unique set of authors contributing to this build.@NotNull List<VariableContextSnapshot>Deprecated.since 5.7 for internal use only, useResultsSummaryVariableAccessorinsteadbooleanWhether a build had changes or notbooleanDeprecated.since 5.15 useCommentManager(or ctx.hasComments in Freemarker(booleanisActive()Shortcut method to see ifgetLifeCycleState()isLifeCycleState.PENDINGorLifeCycleState.QUEUEDorLifeCycleState.IN_PROGRESSbooleanIndicates that this result was run with custom variables (some of the variables were overwritten) - used to display indicator in UIbooleanisFailed()Shortcut method to see ifResultStatisticsProvider.getBuildState()isBuildState.FAILEDbooleanShortcut method to see ifgetLifeCycleState()isLifeCycleState.FINISHEDbooleanShortcut method to see ifgetLifeCycleState()isLifeCycleState.IN_PROGRESSbooleanShortcut method to see ifgetLifeCycleState()isLifeCycleState.NOT_BUILTbooleanTells whether this result belongs to a job that will run when next manual stage is kicked offbooleanIndicates that this result was run with custom revision and should be considered as 'once-off' when calculating telemetry and other stuffbooleanShortcut method to see ifgetLifeCycleState()isLifeCycleState.PENDINGbooleanisQueued()Shortcut method to see ifgetLifeCycleState()isLifeCycleState.QUEUEDbooleanIndicates that this result was rebuild via "re-run this build" action.booleanShortcut method to see ifResultStatisticsProvider.getBuildState()isBuildState.SUCCESSbooleanMethods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getIdMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.atlassian.bamboo.resultsummary.ResultStatisticsProvider
getBuildDate, getBuildNumber, getBuildState, getStatDate
-
Field Details
-
CUSTOM_DATA_BUILD_KEY
- See Also:
-
-
Method Details
-
getPlanResultKey
Gets thePlanResultKeyfor thisImmutableResultsSummary- Returns:
- planResultKey
-
getImmutablePlan
Gets theImmutablePlanthat this result directly belongs to. Since version 6.9 it is possible thatImmutableJobno longer exists but its results do, therefore it is recommended to usegetPlanIfExists()instead of this method when operating on job results.- Returns:
- the owning plan for the result
- Throws:
IllegalStateException- if the plan doesn't exist.
-
getPlanIfExists
Gets theImmutablePlanthat this result directly belongs to.- Returns:
- the owning plan for the result or empty if id doesn't exist.
- Since:
- 6.9
-
getImmutableChain
Gets theImmutableChainthat this result belongs to (directly or not)- Returns:
- the owning plan for the result
- Throws:
IllegalStateException- if the plan doesn't exist.- Since:
- 6.9
-
getPlanKey
Full key of the plan. e.g BAM-MAIN -
getTriggerReason
Why the build was was triggered -
getDeltaState
DeltaState getDeltaState()Gets theDeltaStateof the summary. It can be a build that fixes, breaks, failing, successful. Provides a status relative to the previous summary.- Returns:
-
isOnceOff
boolean isOnceOff()Indicates that this result was run with custom revision and should be considered as 'once-off' when calculating telemetry and other stuff- Returns:
-
isCustomBuild
boolean isCustomBuild()Indicates that this result was run with custom variables (some of the variables were overwritten) - used to display indicator in UI- Returns:
-
isRebuild
boolean isRebuild()Indicates that this result was rebuild via "re-run this build" action.- Returns:
-
getLogSize
Returns the size of log associated with this result.For a
BuildResultsSummarythis method will return size of the log produced by theJob.For a
ChainResultsSummarythe returned value will be equal to the maximum log size produced by thisChain'sJobs.- Returns:
- the log size or null, if the value is not known
-
getDuration
long getDuration()Duration of the build in milliseconds- Specified by:
getDurationin interfaceResultStatisticsProvider- Returns:
-
getProcessingDuration
long getProcessingDuration()Duration of actual build processing in miliseconds- Specified by:
getProcessingDurationin interfaceResultStatisticsProvider- Returns:
-
getBuildCancelledDate
When the build was cancelled- Returns:
- date of build cancellation or null if build was not cancelled
-
getBuildCompletedDate
When the build finished- Returns:
-
isFailed
boolean isFailed()Shortcut method to see ifResultStatisticsProvider.getBuildState()isBuildState.FAILED- Returns:
-
isSuccessful
boolean isSuccessful()Shortcut method to see ifResultStatisticsProvider.getBuildState()isBuildState.SUCCESS- Returns:
-
isPending
boolean isPending()Shortcut method to see ifgetLifeCycleState()isLifeCycleState.PENDING- Returns:
-
isQueued
boolean isQueued()Shortcut method to see ifgetLifeCycleState()isLifeCycleState.QUEUED- Returns:
-
isInProgress
boolean isInProgress()Shortcut method to see ifgetLifeCycleState()isLifeCycleState.IN_PROGRESS- Returns:
-
isNotBuilt
boolean isNotBuilt()Shortcut method to see ifgetLifeCycleState()isLifeCycleState.NOT_BUILT- Returns:
-
isFinished
boolean isFinished()Shortcut method to see ifgetLifeCycleState()isLifeCycleState.FINISHED- Returns:
-
isWaiting
boolean isWaiting()- Returns:
-
isActive
boolean isActive()Shortcut method to see ifgetLifeCycleState()isLifeCycleState.PENDINGorLifeCycleState.QUEUEDorLifeCycleState.IN_PROGRESS- Returns:
-
getCustomBuildData
Custom data map to store random metadata about the build- Returns:
-
getJiraIssues
Returns all the JIRA issues linked to this build result- Returns:
-
getFixingJiraIssues
Return JIRA issues that this build result summary fixes- Returns:
-
getRelatedJiraIssues
Returns JIRA issues that are related to this build result. Does not include fixing issues- Returns:
-
getJiraIssueKeys
Returns all the JIRA issue keys linked to this build result- Returns:
-
getRepositoryChangesets
-
hasComments
Deprecated.since 5.15 useCommentManager(or ctx.hasComments in Freemarker(Checks if the result has any user comments for the build- Returns:
-
getLabellings
Tags / labels associated with the build- Returns:
-
getLabelNames
A shortcut method to get all of the label names from the labellings- Returns:
-
getUniqueAuthors
A shortcut method to get the unique set of authors contributing to this build. -
hasChanges
boolean hasChanges()Whether a build had changes or not- Returns:
-
getTimeToFix
A stored version of how long (milli seconds) it took for this build to fix a failure.- Returns:
- Null if not a fixing build
-
getTestResultsSummary
- Returns:
- a summary of all the tests that ran in this build.
-
getDurationDescription
Returns the duration in a "pretty" format. Handles when duration is not known- Returns:
- formatted duration
-
getProcessingDurationDescription
String getProcessingDurationDescription()Returns the processing duration in a "pretty" format. Handles unknown processing duration.- Returns:
- formatted processing duration
-
getShortReasonSummary
String getShortReasonSummary() -
getReasonSummary
String getReasonSummary() -
getRelativeBuildDate
String getRelativeBuildDate() -
getRelativeQueueDate
String getRelativeQueueDate() -
getRelativeBuildStartedDate
String getRelativeBuildStartedDate()Returns the relative started time (duration) compared to current date- Returns:
- relative duration
-
getTestSummary
-
getRelativeBuildDate
-
getRelativeQueueDate
-
getRelativeBuildStartedDate
Returns the relative started time (duration) compared to date passed as parameter- Parameters:
comparedTo-- Returns:
- relative duration
-
getBuildTime
String getBuildTime()Formatted buildDate. When the build was started- Returns:
-
getQueueTime
When the build queued- Returns:
-
getArtifactLinks
Returns all artifacts associated with this build. Even if the files don't exist- Returns:
-
getArtifactLinksThatExist
Deprecated.since 4.3Returns only artifacts that exists- Returns:
-
getLifeCycleState
LifeCycleState getLifeCycleState() -
getChangesListSummary
-
getSubscriptions
Returns list of consumed artifact dependenciesConsumedSubscription- Returns:
-
getSubstitutedVariables
Deprecated.since 5.15 without replacement, returns empty list for any result created by Bamboo 5.15 or laterReturns immutable list of variables substituted during build execution -
getVariableContextLogs
Deprecated.since 5.7 for internal use only, useResultsSummaryVariableAccessorinstead -
getManuallyOverriddenVariables
Deprecated.since 5.15 for internal use only, useResultsSummaryVariableAccessorinsteadReturns empty list for any result created by Bamboo 5.15 or later -
getRestartCount
int getRestartCount()Return the number of build restart attempts- Returns:
-
isNotRunYet
boolean isNotRunYet()Tells whether this result belongs to a job that will run when next manual stage is kicked off- Returns:
-
getCommits
com.google.common.collect.ImmutableList<Commit> getCommits()List of commits associated with the build represented by this summary- Returns:
- list of commits
-
getBuildAgentId
The id of the latest agent that built the result- Returns:
- Null if no agents involved or unknown
-
getBuildAgentType
The type of the latest agent that built the result- Returns:
- Null if no agents involved or unknown
- Since:
- 9.3
-
getFullPlanName
- Returns:
- full plan name
- Since:
- 6.9
-
getPlanName
- Returns:
- short plan name
- Since:
- 6.9
-