Interface ResultsSummary
-
- All Superinterfaces:
BambooCustomDataAware
,BambooIdProvider
,BambooObject
,Comparable<ImmutableResultsSummary>
,Deletable
,ImmutableDeletable
,ImmutableResultsSummary
,PlanResultKeyProvider
,ResultStatisticsProvider
- All Known Subinterfaces:
BuildResultsSummary
,ChainResultsSummary
,MutableBuildKeyResultsSummary
- All Known Implementing Classes:
AbstractResultsSummary
,BuildResultsSummaryImpl
,ChainResultsSummaryImpl
@PublicApi public interface ResultsSummary extends BambooObject, Deletable, ImmutableResultsSummary, BambooCustomDataAware, PlanResultKeyProvider
Used to store the result of allPlan
executions- Since:
- 2.7
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
CUSTOM_DATA_BUILD_KEY
-
Fields inherited from interface com.atlassian.bamboo.plan.PlanResultKeyProvider
getPlanKey
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addVariableContextItem(@NotNull VariableContextSnapshot variableContext)
@NotNull String
getBuildKey()
Deprecated.since 4.3, useImmutableResultsSummary.getPlanKey()
@NotNull String
getBuildResultKey()
Deprecated.since 4.3, useImmutableResultsSummary.getPlanResultKey()
int
getFormatVersion()
@NotNull ImmutablePlan
getImmutablePlan()
Gets theImmutablePlan
that this result belongs directly belongs to.@NotNull List<VariableSubstitution>
getSubstitutedVariablesEncrypted()
Deprecated.returns empty list for any result created with version 5.7 or later@Nullable Long
getVariableContextBaselineId()
@NotNull List<VariableContextSnapshot>
getVariableContextLogsEncrypted()
since 7.0 for internal use only, useResultsSummaryVariableAccessor
insteadint
incrementRestartCount()
Increments number of build restarts and returns the new valuevoid
resetTestClassResults(@NotNull List<TestClassResult> testClassResults)
Overrides all current testClassResults with the new onesvoid
setBuildAgentId(long buildAgentId)
void
setBuildAgentType(@Nullable AgentType agentType)
Sets the build agent type.void
setBuildCancelledDate(Date buildCancelledDate)
void
setBuildCompletedDate(@Nullable Date completionDate)
void
setBuildDate(Date buildDate)
void
setCustomBuild(boolean customBuild)
void
setDeltaState(DeltaState deltaState)
Sets theDeltaState
for the summary.void
setDuration(long duration)
void
setLogSize(@Nullable Long logSize)
Sets the size of the log file associated with this result, eg.void
setOnceOff(boolean onceOff)
void
setProcessingDuration(long processingDuration)
void
setQueueTime(Date queueDate)
void
setRebuild(boolean rebuild)
void
setRestartCount(int restartCount)
Sets number of build restarts.void
setTestResultsSummary(@NotNull TestResultsSummary testResultsSummary)
Set the test summary information from this buildvoid
setTimeToFix(Long timeToFix)
A stored version of how long (milli seconds) it took for this build to fix a failure.void
setTriggerReason(TriggerReason triggerReason)
void
updateFormatVersion()
Sets format version to current Bamboo build number.void
updateLifeCycleState(@NotNull LifeCycleState lifeCycleState, @NotNull BuildState buildState)
Update lifeCycleState and buildState in one go.-
Methods inherited from interface com.atlassian.bamboo.core.BambooCustomDataAware
updateCustomDataEntry
-
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface com.atlassian.bamboo.deletion.Deletable
setMarkedForDeletion
-
Methods inherited from interface com.atlassian.bamboo.plan.cache.ImmutableDeletable
isMarkedForDeletion
-
Methods inherited from interface com.atlassian.bamboo.resultsummary.ImmutableResultsSummary
getArtifactLinks, getArtifactLinksThatExist, getBuildAgentId, getBuildAgentType, getBuildCancelledDate, getBuildCompletedDate, getBuildTime, getChangesListSummary, getCommits, getCustomBuildData, getDeltaState, getDuration, getDurationDescription, getFixingJiraIssues, getFullPlanName, getImmutableChain, getJiraIssueKeys, getJiraIssues, getLabellings, getLabelNames, getLifeCycleState, getLogSize, getManuallyOverriddenVariables, getPlanIfExists, getPlanKey, getPlanName, getPlanResultKey, getProcessingDuration, getProcessingDurationDescription, getQueueTime, getReasonSummary, getRelatedJiraIssues, getRelativeBuildDate, getRelativeBuildDate, getRelativeBuildStartedDate, getRelativeBuildStartedDate, getRelativeQueueDate, getRelativeQueueDate, getRepositoryChangesets, getRestartCount, getShortReasonSummary, getSubscriptions, getSubstitutedVariables, getTestResultsSummary, getTestSummary, getTimeToFix, getTriggerReason, getUniqueAuthors, getVariableContextLogs, hasChanges, hasComments, isActive, isCustomBuild, isFailed, isFinished, isInProgress, isNotBuilt, isNotRunYet, isOnceOff, isPending, isQueued, isRebuild, isSuccessful, isWaiting
-
Methods inherited from interface com.atlassian.bamboo.plan.PlanResultKeyProvider
getPlanResultKey
-
Methods inherited from interface com.atlassian.bamboo.resultsummary.ResultStatisticsProvider
getBuildDate, getBuildNumber, getBuildState, getStatDate
-
-
-
-
Method Detail
-
getImmutablePlan
@NotNull @NotNull ImmutablePlan getImmutablePlan()
Gets theImmutablePlan
that this result belongs directly belongs to. Since version 6.9 it is possible thatImmutableJob
no longer exists but its results do, therefore it is recommended to useImmutableResultsSummary.getPlanIfExists()
instead when operating on job results.- Specified by:
getImmutablePlan
in interfaceImmutableResultsSummary
- Returns:
- the owning plan for the result
- Throws:
IllegalStateException
- if the plan doesn't exist.
-
getBuildKey
@Deprecated @NotNull @NotNull String getBuildKey()
Deprecated.since 4.3, useImmutableResultsSummary.getPlanKey()
- Returns:
- full key of the plan. e.g BAM-MAIN
-
getBuildResultKey
@Deprecated @NotNull @NotNull String getBuildResultKey()
Deprecated.since 4.3, useImmutableResultsSummary.getPlanResultKey()
- Returns:
- full build result key e.g. BAM-MAIN-100
-
setTriggerReason
void setTriggerReason(TriggerReason triggerReason)
-
setDeltaState
void setDeltaState(DeltaState deltaState)
Sets theDeltaState
for the summary. Provides a status relative to the previous summary.- Parameters:
deltaState
- - the relative status for this summary
-
setOnceOff
void setOnceOff(boolean onceOff)
-
setCustomBuild
void setCustomBuild(boolean customBuild)
-
setRebuild
void setRebuild(boolean rebuild)
-
setLogSize
void setLogSize(@Nullable @Nullable Long logSize)
Sets the size of the log file associated with this result, eg. size of the log produced by aJob
or largest log produced byChain
'sJob
s.- Parameters:
logSize
- size of the largest log associated with the result (use null if unknown)
-
setDuration
void setDuration(long duration)
- Parameters:
duration
- duration of the build in milliseconds
-
setProcessingDuration
void setProcessingDuration(long processingDuration)
- Parameters:
processingDuration
-
-
setBuildCompletedDate
void setBuildCompletedDate(@Nullable @Nullable Date completionDate)
-
setBuildCancelledDate
void setBuildCancelledDate(Date buildCancelledDate)
-
setTimeToFix
void setTimeToFix(Long timeToFix)
A stored version of how long (milli seconds) it took for this build to fix a failure.- Parameters:
timeToFix
- how long (milli seconds) it took for this build to fix a failure.
-
resetTestClassResults
void resetTestClassResults(@NotNull @NotNull List<TestClassResult> testClassResults)
Overrides all current testClassResults with the new ones- Parameters:
testClassResults
- to set
-
setTestResultsSummary
void setTestResultsSummary(@NotNull @NotNull TestResultsSummary testResultsSummary)
Set the test summary information from this build- Parameters:
testResultsSummary
- the test summary information
-
setBuildDate
void setBuildDate(Date buildDate)
- Parameters:
buildDate
-
-
setQueueTime
void setQueueTime(Date queueDate)
- Parameters:
queueDate
-
-
updateLifeCycleState
void updateLifeCycleState(@NotNull @NotNull LifeCycleState lifeCycleState, @NotNull @NotNull BuildState buildState)
Update lifeCycleState and buildState in one go. Can throw IllegalArgumentException when values passed make no sense: - lifeCycleState == LifeCycleState.NOT_BUILT && buildState != BuildState.UNKNOWN- Parameters:
lifeCycleState
- lifeCycleState to be setbuildState
- buildState to be set
-
incrementRestartCount
int incrementRestartCount()
Increments number of build restarts and returns the new value
-
setRestartCount
@Internal void setRestartCount(int restartCount)
Sets number of build restarts.
-
setBuildAgentId
void setBuildAgentId(long buildAgentId)
-
setBuildAgentType
void setBuildAgentType(@Nullable @Nullable AgentType agentType)
Sets the build agent type.- Since:
- 9.3
-
getVariableContextBaselineId
@Nullable @Nullable Long getVariableContextBaselineId()
-
getFormatVersion
int getFormatVersion()
- Returns:
- build number of Bamboo version in which this result was created
-
updateFormatVersion
void updateFormatVersion()
Sets format version to current Bamboo build number.
-
getVariableContextLogsEncrypted
@Internal @NotNull @NotNull List<VariableContextSnapshot> getVariableContextLogsEncrypted()
since 7.0 for internal use only, useResultsSummaryVariableAccessor
instead
-
getSubstitutedVariablesEncrypted
@Internal @Deprecated @NotNull @NotNull List<VariableSubstitution> getSubstitutedVariablesEncrypted()
Deprecated.returns empty list for any result created with version 5.7 or latersince 7.0 for internal use only, useResultsSummaryVariableAccessor
instead
-
addVariableContextItem
void addVariableContextItem(@NotNull @NotNull VariableContextSnapshot variableContext)
-
-