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 Details

  • Method Details

    • getPlanResultKey

      @NotNull @NotNull PlanResultKey getPlanResultKey()
      Returns:
      planResultKey
    • getImmutablePlan

      @NotNull @NotNull ImmutablePlan getImmutablePlan()
      Gets the ImmutablePlan that this result directly belongs to. Since version 6.9 it is possible that ImmutableJob no longer exists but its results do, therefore it is recommended to use getPlanIfExists() 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

      @NotNull @NotNull Optional<? extends ImmutablePlan> getPlanIfExists()
      Gets the ImmutablePlan that this result directly belongs to.
      Returns:
      the owning plan for the result or empty if id doesn't exist.
      Since:
      6.9
    • getImmutableChain

      @NotNull @NotNull ImmutableChain getImmutableChain()
      Gets the ImmutableChain that 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

      @NotNull @NotNull PlanKey getPlanKey()
      Full key of the plan. e.g BAM-MAIN
    • getTriggerReason

      @NotNull @NotNull TriggerReason getTriggerReason()
      Why the build was was triggered
    • getDeltaState

      DeltaState getDeltaState()
      Gets the DeltaState of 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

      @Nullable @Nullable Long getLogSize()
      Returns the size of log associated with this result.

      For a BuildResultsSummary this method will return size of the log produced by the Job.

      For a ChainResultsSummary the returned value will be equal to the maximum log size produced by this Chain's Jobs.

      Returns:
      the log size or null, if the value is not known
    • getDuration

      long getDuration()
      Duration of the build in milliseconds
      Specified by:
      getDuration in interface ResultStatisticsProvider
      Returns:
    • getProcessingDuration

      long getProcessingDuration()
      Duration of actual build processing in miliseconds
      Specified by:
      getProcessingDuration in interface ResultStatisticsProvider
      Returns:
    • getBuildCancelledDate

      @Nullable @Nullable Date getBuildCancelledDate()
      When the build was cancelled
      Returns:
      date of build cancellation or null if build was not cancelled
    • getBuildCompletedDate

      @Nullable @Nullable Date getBuildCompletedDate()
      When the build finished
      Returns:
    • isFailed

      boolean isFailed()
      Returns:
    • isSuccessful

      boolean isSuccessful()
      Returns:
    • isPending

      boolean isPending()
      Shortcut method to see if getLifeCycleState() is LifeCycleState.PENDING
      Returns:
    • isQueued

      boolean isQueued()
      Shortcut method to see if getLifeCycleState() is LifeCycleState.QUEUED
      Returns:
    • isInProgress

      boolean isInProgress()
      Shortcut method to see if getLifeCycleState() is LifeCycleState.IN_PROGRESS
      Returns:
    • isNotBuilt

      boolean isNotBuilt()
      Shortcut method to see if getLifeCycleState() is LifeCycleState.NOT_BUILT
      Returns:
    • isFinished

      boolean isFinished()
      Shortcut method to see if getLifeCycleState() is LifeCycleState.FINISHED
      Returns:
    • isWaiting

      boolean isWaiting()
      Returns:
    • isActive

      boolean isActive()
      Returns:
    • getCustomBuildData

      @NotNull @NotNull Map<String,String> getCustomBuildData()
      Custom data map to store random metadata about the build
      Returns:
    • getJiraIssues

      @NotNull @NotNull Set<LinkedJiraIssue> getJiraIssues()
      Returns all the JIRA issues linked to this build result
      Returns:
    • getFixingJiraIssues

      @NotNull @NotNull Set<LinkedJiraIssue> getFixingJiraIssues()
      Return JIRA issues that this build result summary fixes
      Returns:
    • getRelatedJiraIssues

      @NotNull @NotNull Set<LinkedJiraIssue> getRelatedJiraIssues()
      Returns JIRA issues that are related to this build result. Does not include fixing issues
      Returns:
    • getJiraIssueKeys

      Set<String> getJiraIssueKeys()
      Returns all the JIRA issue keys linked to this build result
      Returns:
    • getRepositoryChangesets

      @NotNull @NotNull List<RepositoryChangeset> getRepositoryChangesets()
    • hasComments

      @Deprecated boolean hasComments()
      Deprecated.
      since 5.15 use CommentManager (or ctx.hasComments in Freemarker(
      Checks if the result has any user comments for the build
      Returns:
    • getLabellings

      List<Labelling> getLabellings()
      Tags / labels associated with the build
      Returns:
    • getLabelNames

      @NotNull @NotNull List<String> getLabelNames()
      A shortcut method to get all of the label names from the labellings
      Returns:
    • getUniqueAuthors

      Set<Author> getUniqueAuthors()
      A shortcut method to get the unique set of authors contributing to this build.
      Returns:
      Set of Authors
    • hasChanges

      boolean hasChanges()
      Whether a build had changes or not
      Returns:
    • getTimeToFix

      @Nullable @Nullable Long 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

      @NotNull @NotNull TestResultsSummary getTestResultsSummary()
      Returns:
      a summary of all the tests that ran in this build.
    • getDurationDescription

      @NotNull @NotNull String 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

      @NotNull @NotNull String getTestSummary()
    • getRelativeBuildDate

      String getRelativeBuildDate(Date comparedTo)
    • getRelativeQueueDate

      String getRelativeQueueDate(Date comparedTo)
    • getRelativeBuildStartedDate

      String getRelativeBuildStartedDate(Date comparedTo)
      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

      @Nullable @Nullable Date getQueueTime()
      When the build queued
      Returns:
    • getArtifactLinks

      @NotNull @NotNull Collection<ArtifactLink> getArtifactLinks()
      Returns all artifacts associated with this build. Even if the files don't exist
      Returns:
    • getArtifactLinksThatExist

      @Deprecated Collection<ArtifactLink> getArtifactLinksThatExist()
      Deprecated.
      since 4.3
      Returns only artifacts that exists
      Returns:
    • getLifeCycleState

      LifeCycleState getLifeCycleState()
    • getChangesListSummary

      @NotNull @NotNull String getChangesListSummary()
    • getSubscriptions

      @NotNull @NotNull List<ConsumedSubscription> getSubscriptions()
      Returns list of consumed artifact dependencies ConsumedSubscription
      Returns:
    • getSubstitutedVariables

      @NotNull @Deprecated @NotNull List<VariableSubstitution> getSubstitutedVariables()
      Deprecated.
      since 5.15 without replacement, returns empty list for any result created by Bamboo 5.15 or later
      Returns immutable list of variables substituted during build execution
    • getVariableContextLogs

      @Deprecated @NotNull @NotNull List<VariableContextSnapshot> getVariableContextLogs()
      Deprecated.
      since 5.7 for internal use only, use ResultsSummaryVariableAccessor instead
    • getManuallyOverriddenVariables

      @Deprecated List<VariableSubstitution> getManuallyOverriddenVariables()
      Deprecated.
      since 5.15 for internal use only, use ResultsSummaryVariableAccessor instead
      Returns 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

      @Nullable @Nullable Long getBuildAgentId()
      The id of the latest agent that built the result
      Returns:
      Null if no agents involved or unknown
    • getBuildAgentType

      @Nullable @Nullable AgentType getBuildAgentType()
      The type of the latest agent that built the result
      Returns:
      Null if no agents involved or unknown
      Since:
      9.3
    • getFullPlanName

      @NotNull @NotNull String getFullPlanName()
      Returns:
      full plan name
      Since:
      6.9
    • getPlanName

      @NotNull @NotNull String getPlanName()
      Returns:
      short plan name
      Since:
      6.9