Class BuildStatusHelper


  • public class BuildStatusHelper
    extends Object
    • Method Detail

      • getFixedInBuild

        @Nullable
        public @Nullable ResultsSummary getFixedInBuild()
        If the currentBuildResult is set and not successful then return first successful BuildResultSummary after this one. Returns null if currentBuildResult is not set or currentBuildResult is set and successful or if there was no successful build after this one.
        Returns:
        first successful BuildResultSummary after this one
      • getPreviousSuccessfulBuild

        @Nullable
        public @Nullable ResultsSummary getPreviousSuccessfulBuild()
        Returns:
        previous successful BuildResultSummary or null if none found
      • getFailingSinceBuild

        @Nullable
        public @Nullable ResultsSummary getFailingSinceBuild()
        If the currentBuildResult is set and failing then return first failed BuildResultSummary in series. Returns null if: - currentBuildResult is not set, or - currentBuildResult is set and not failing
        Returns:
        first failing BuildResultSummary in a series that contains currentBuildResult
      • getFixesBuild

        @Nullable
        public @Nullable ResultsSummary getFixesBuild()
        If the currentBuildResult is set and successful then return first failed BuildResultSummary in series that preceded currentBuildResult. Returns null if: - currentBuildResult is not set, or - currentBuildResult is set and not successful, or - previous successful BuildResultSummary is not found, or - failing build not found between previous successful BuildResultSummary and currentBuildResult
        Returns:
        first failed BuildResultSummary in series that preceded currentBuildResult
      • getPrecedingConsecutiveFailuresCount

        public int getPrecedingConsecutiveFailuresCount()
        Returns:
        number of consecutive failures preceding the current BuildResultSummary. 0 if conditions for getFailingSinceBuild() are not met
      • getSucceedingSinceBuild

        @Nullable
        public @Nullable ResultsSummary getSucceedingSinceBuild()
        If the currentBuildResult is set and successful then return first successful BuildResultSummary in series. Returns null if: - currentBuildResult is not set, or - currentBuildResult is set and not successful
        Returns:
        first successful BuildResultSummary in a series that contains currentBuildResult
      • getCountSucceedingSince

        public int getCountSucceedingSince()
        Returns:
        number of successful BuildResultSummary preceding and including currentBuildResult in a series, 0 if conditions for getSucceedingSinceBuild() are not met
      • getFirstBuildInSequence

        @Nullable
        public @Nullable ResultsSummary getFirstBuildInSequence()
        Poorly named method. Returns the first BuildResultsSummary in this sequence. Essentially, it tries to find the first failing build, failing that it finds the build that this build fixes
        Returns:
        May return null if neither conditions are met
      • getCountOfPrecedingResultsInState

        public int getCountOfPrecedingResultsInState​(int lowerBuildNumber,
                                                     BuildState buildState)
        Returns count of preceding results in state buildState with range starting with build lowerBuildNumber (inclusive). The count does not include the current result.