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 all Plan executions
Since:
2.7
  • Method Details

    • getImmutablePlan

      @NotNull @NotNull ImmutablePlan getImmutablePlan()
      Gets the ImmutablePlan that this result belongs 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 ImmutableResultsSummary.getPlanIfExists() instead when operating on job results.
      Specified by:
      getImmutablePlan in interface ImmutableResultsSummary
      Returns:
      the owning plan for the result
      Throws:
      IllegalStateException - if the plan doesn't exist.
    • getBuildKey

      @Deprecated @NotNull @NotNull String getBuildKey()
      Deprecated.
      Returns:
      full key of the plan. e.g BAM-MAIN
    • getBuildResultKey

      @Deprecated @NotNull @NotNull String getBuildResultKey()
      Deprecated.
      Returns:
      full build result key e.g. BAM-MAIN-100
    • setTriggerReason

      void setTriggerReason(TriggerReason triggerReason)
    • setDeltaState

      void setDeltaState(DeltaState deltaState)
      Sets the DeltaState 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 a Job or largest log produced by Chain's Jobs.
      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 set
      buildState - 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, use ResultsSummaryVariableAccessor instead
    • getSubstitutedVariablesEncrypted

      @Internal @Deprecated @NotNull @NotNull List<VariableSubstitution> getSubstitutedVariablesEncrypted()
      Deprecated.
      returns empty list for any result created with version 5.7 or later
      since 7.0 for internal use only, use ResultsSummaryVariableAccessor instead
    • addVariableContextItem

      void addVariableContextItem(@NotNull @NotNull VariableContextSnapshot variableContext)