@PublicApi
public interface ResultsSummaryManager
ResultsSummary derivatives that supersedes BuildResultsSummaryManager| Modifier and Type | Method and Description |
|---|---|
void |
addVariableContextSnapshotToResultSummary(ResultsSummary resultsSummary,
VariableContext variableContext)
Adds state of global and plan variables to result at the beginning of execution.
|
void |
calculateAndSetDeltaState(ResultsSummary resultsSummary)
Figures out the delta state for the provided results summary, if a 'fixing' build
will also calculate how long it took to fix.
|
Long |
calculateQueueDuration(ChainResultsSummary resultsSummary)
Calculates queueDuration value for a chain result as a maximum value of (vcsUpdateTime - queueTime) for all related job results.
|
Long |
calculateVcsUpdateDuration(ChainResultsSummary resultsSummary)
Calculates vcsUpdateDuration value for a chain result as a maximum value of (buildDate - vcsUpdateTime) for all related job results.
|
void |
clearVariablesOnRerunBuild(ResultsSummary resultSummary)
Clear stored stage manual variables when build is fully rerun.
|
int |
countResultsWithState(PlanKey planKey,
int lowerBuildNumber,
int upperBuildNumber,
BuildState buildState)
Counts results with a given state in a given build number range for plan.
|
<T extends ResultsSummary> |
createResultsSummary(BuildContext buildContext,
Class<T> aClass)
Creates a
ResultsSummary of the given Class |
List<Integer> |
findAllBuildResultsNumbers(PlanKey planKey) |
List<ChainResultsSummary> |
findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria,
List<Label> labels)
Searches through all chains to find any that have jobs which match the given labels.
|
ResultsSummary |
findFirstFailedBuildResultAfter(String buildKey,
int buildNumber)
Finds the first failed
ResultsSummary after buildNumber |
ResultsSummary |
findFirstFailedBuildResultBetween(ImmutablePlan build,
int lowerBuildNumber,
int upperBuildNumber)
Finds the first failed build between the upper and lower build numbers inclusively.
|
<T extends ResultsSummary> |
findFirstResultAfter(PlanResultKey planResultKey,
Class<T> aClass)
Finds the first
ResultsSummary after a specified build which is either FINISHED or can be FINISHED, i.e. |
ResultsSummary |
findFirstSuccessfulBuildResultAfter(PlanResultKey planResultKey)
Finds the last successful
ResultsSummary after buildNumber |
ResultsSummary |
findFirstSuccessfulBuildResultAfter(String buildKey,
int buildNumber)
Deprecated.
since 5.2 use
findFirstSuccessfulBuildResultAfter(PlanResultKey) |
List<LinkedJiraIssue> |
findJiraIssuesForPlan(ImmutablePlan plan)
Deprecated.
replaced by
#findJiraIssuesForPlanKey(String)} |
List<LinkedJiraIssue> |
findJiraIssuesForPlanKey(PlanKey planKey)
Retrieves a list of
LinkedJiraIssue linked to the given plan key |
List<LinkedJiraIssue> |
findJiraIssuesForResults(List<ResultsSummary> buildResults)
Retrieves a list of
LinkedJiraIssue linked to the given build result summaries |
ResultsSummary |
findLastBuildResultBefore(String buildKey,
int buildNumber)
Finds the last successful or failing
BuildResultsSummary before buildNumber |
<T extends ResultsSummary> |
findLastBuildResultBeforeWithTests(PlanResultKey planResultKey,
Class<T> aClass,
boolean includeOnceOffBuilds)
Finds the last successful or failing
BuildResultsSummary before buildNumber |
ResultsSummary |
findLastFailingBuildResultBefore(ImmutablePlan build,
int buildNumber)
Finds the last failing
ResultsSummary before buildNumber |
<T extends ResultsSummary> |
findLastResultBefore(PlanResultKey planResultKey,
Class<T> aClass)
Finds the last successful or failing
ResultsSummary before planResultKey.getBuildNumber |
<T extends ResultsSummary> |
findLastResultBefore(PlanResultKey planResultKey,
Class<T> aClass,
boolean includeOnceOffBuilds)
Finds the last
ResultsSummary before planResultKey.getBuildNumber |
<T extends ResultsSummary> |
findLastResultSummaryWithState(PlanKey planKey,
BuildState buildState,
Class<T> aClass) |
ResultsSummary |
findLastSuccessfulBuildResultBefore(ImmutablePlan build,
int buildNumber)
Deprecated.
Use
findLastSuccessfulBuildResultBefore(PlanResultKey) instead. Since v5.2. |
ResultsSummary |
findLastSuccessfulBuildResultBefore(PlanResultKey planResultKey)
Finds the last successful
ResultsSummary before build |
List<? extends ResultsSummary> |
findResultsSummariesByJiraIssues(List<String> issueKeys)
Finds a list of results which are linked to the given issue keys
|
List<? extends ResultsSummary> |
findResultsSummariesByProjectKey(String projectKey)
Provide a list of results which are linked to any issues under the given jira project key
|
<T extends ResultsSummary> |
getAllActiveResultSummariesForPlan(PlanKey planKey,
Class<T> aClass)
Returns all the
ResultsSummary in a LifeCycleState.IN_PROGRESS state |
List<BuildResultsSummary> |
getAllBuildResultsSummariesForAgent(Long agentId)
Returns all
BuildResultsSummary for the passed BuildAgent's id. |
<T extends ResultsSummary> |
getAllBuildResultSummariesInUnknownState(Class<T> aClass)
Returns all the
BuildResultsSummary in a BuildState.UNKNOWN
state |
<T extends ResultsSummary> |
getAllInProgressResultSummaries(Class<T> aClass)
Returns all the
ResultsSummary in a LifeCycleState.IN_PROGRESS state |
<T extends ResultsSummary> |
getAllPendingResultSummaries(Class<T> aClass)
Returns all the
ResultsSummary in a LifeCycleState.PENDING state |
<T extends ResultsSummary> |
getAllQueuedResultSummaries(Class<T> aClass)
Returns all the
ResultsSummary in a LifeCycleState.QUEUED state |
long |
getAveragePlanExecutionDuration(ImmutablePlan plan,
int numberOfResults)
Get average duration from n last results summaries in finished state for a plan.
|
ResultsSummary |
getBreakingBuild(ResultsSummary buildResultsSummary)
Returns the first failing build after the last successful build.
|
ChainStageResult |
getChainStageResultById(Long id)
Returns a
ChainStageResult by its id |
List<UnassociatedCommit> |
getCommitsForUser(String username,
int max)
Retrieve a list of recent Commits for the given user.
|
<T extends ResultsSummary> |
getFinalizedResultSummariesForPlan(PlanKey planKey,
Class<T> aClass,
int firstResult,
int maxResults)
Returns all the
ResultsSummary in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state with the given Class. |
ResultsSummary |
getFixingBuild(ResultsSummary buildResultsSummary)
Returns the first successful
ResultsSummary for given ResultsSummary. |
List<BuildResultsSummary> |
getLastNBuildResultsSummaries(ImmutableBuildable buildable,
int numberOfResults)
Deprecated.
since 2.7 use
getLastNResultsSummaries(com.atlassian.bamboo.plan.cache.ImmutablePlan, int) instead |
List<ResultsSummary> |
getLastNFailedResultsSummaries(Plan build,
int numberOfResults)
Returns the most recent n failed build results.
|
List<ResultsSummary> |
getLastNResultsSummaries(ImmutablePlan plan,
int numberOfResults)
Provides a list of the latest N results summaries for the given plan, newest first.
|
<T extends ResultsSummary> |
getLastResultsSummary(String planKey,
Class<T> aClass)
Get the last
ResultsSummary for planKey and Class |
ResultsSummary |
getLastSuccessfulResultSummary(PlanKey planKey)
Get the last successful
ResultsSummary for planKey |
List<ResultsSummary> |
getLatestFailedResultSummaries()
Retrieve list of failed build results (for all builds) in the last few days (number of days is specified in the
DAO) This method is filtered to remove results that user doesn't have permission to see
|
List<ResultsSummary> |
getLatestResultSummaries()
Retrieve list of build results (for all builds) in the last few days (number of days is specified in the DAO)
This method is filtered to remove results that user doesn't have permission to see
|
List<BuildResultsSummary> |
getLatestSummariesForAgent(Long agentId,
Date fromDate)
Retrieves build summaries for agent id not older than certain date.
|
List<BuildResultsSummary> |
getLatestSummariesForAgent(Long agentId,
int maxCount)
Retrieves n last build summaries for agent.
|
BuildResultsSummary |
getLatestSummaryForAgent(long agentId) |
List<ResultsSummary> |
getNeighbouringSummaries(ImmutablePlan plan,
int buildNumber,
int neighbouringSummariesMaxCount)
Returns all the
ResultsSummary objects that matches the passed build numbers |
List<ResultsSummary> |
getNeighbouringSummaries(Plan plan,
int buildNumber)
Returns all the
ResultsSummary objects that matches the passed build numbers |
int |
getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
Gets the number of concurrently running builds
|
long |
getNumberOfFinalizedResults(ImmutablePlan plan)
Get number of the
ResultsSummarys in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state for the given Plan |
long |
getNumberOfFinishedResults(Plan plan)
|
long |
getNumberOfResults()
Get number of all
ResultsSummarys |
ChainResultsSummary |
getParentResultSummary(ResultsSummary resultsSummary)
Get (@link ChainResultsSummary} containing given
ResultsSummary |
List<PlanKey> |
getPlanKeysSortedByNumberOfFinalizedResultSummaries() |
ResultsSummary |
getResultsSummary(long id)
Lookup the ResultsSummary by id
|
ResultsSummary |
getResultsSummary(PlanResultKey planResultKey)
Lookup the ResultsSummary by
PlanResultKey |
<T extends ResultsSummary> |
getResultsSummary(PlanResultKey planResultKey,
Class<T> aClass)
Lookup
ResultsSummary by PlanResultKey and expected type |
<T extends ResultsSummary> |
getResultsSummary(PlanResultKey planResultKey,
Class<T> aClass,
ResultDataRead dataRead)
Lookup
ResultsSummary by PlanResultKey and expected type. |
ResultsSummary |
getResultsSummary(PlanResultKey planResultKey,
ResultDataRead dataRead)
Lookup the ResultsSummary by
PlanResultKey. |
<T extends ResultsSummary> |
getResultSummaries(ResultsSummaryCriteria criteria)
Generic search to find any result summaries bases on the criteria provided.
|
<T extends ResultsSummary> |
getResultSummariesByChangeSetId(String changeSetId,
Class<T> discriminator)
Get a list of all build results containing a commit with the given change set ID.
|
<T extends ResultsSummary> |
getResultSummariesByChangeSetIdAndRepository(long repositoryId,
String changeSetId,
Class<T> discriminator)
Get a list of all build results containing a commit with the given change set ID that are in the given repository.
|
<T extends ResultsSummary> |
getResultSummariesByChangeSetIds(Iterable<Pair<String,RepositoryData>> changeSetIds,
Class<T> discriminator)
Get a list of all build results containing a commit with any of the given change set IDs and which are in the supplied list of repository datas.
|
<T extends ResultsSummary> |
getResultSummariesByChangeSetIds(List<String> changeSetIds,
Class<T> discriminator)
Get a list of all build results containing a commit with any of the given change set IDs.
|
<T extends ResultsSummary> |
getResultSummariesForExpiry(ExpiryCriteria expiryCriteria)
Searches for
result summaries according to the given criteria for
use in build expiry. |
<T extends ResultsSummary> |
getResultSummariesForPlan(ImmutablePlan plan,
int firstResult,
int maxResults)
|
<T extends ResultsSummary> |
getResultSummariesForPlanByLifeCycleState(Plan plan,
LifeCycleState lifeCycleState,
int firstResult,
int maxResults)
Get the
ResultsSummarys for the given Plan in give LifeCycleState that are Results are sorted by build number (descending). |
ChainStageResult |
getStageForResult(ResultsSummary resultsSummary)
Get (@link ChainStageResult} containing given
ResultsSummary |
void |
invalidateLogSize(PlanResultKey planResultKey)
Invalidates the log size of a
ResultsSummary with the given PlanResultKey. |
void |
logSubstitutedVariables(BuildContext buildContext,
ResultsSummary resultsSummary)
Adds variable substitution result to
ResultsSummary
This method logs substitution after it was performed and will use only REALLY substituted values |
void |
logVariablesForSubstitution(BuildContext buildContext,
ResultsSummary resultsSummary)
Adds expected variable substitution to
ResultsSummary
This method logs substitution before build was performed and is used basically to log substitution against plan result
as there will be no possibility to track it afterwards |
int |
markResultSummariesForDeletion(PlanKey planKey)
Mass update of all
ResultsSummary records in the database related to a Plan identified by planKey. |
void |
moveResultSummaries(PlanKey oldPlanKey,
PlanKey newPlanKey)
Deprecated.
since 3.2, use
moveResultSummaries(Plan, PlanKey, PlanKey) |
void |
moveResultSummaries(Plan newParentPlan,
PlanKey oldPlanKey,
PlanKey newPlanKey)
Reassigns plan key ResultsSummaries associated with selected plan key.
|
void |
postBuildVariableSnapshotUpdate(ResultsSummary resultsSummary,
VariableContext variableContext)
Saves result variables produced in a job.
|
int |
removeAllOrphanedResultSummaries()
Removes all the
ResultsSummary objects in the database that do not have a matching Plan |
void |
removeArtifacts(ImmutablePlan plan,
int buildNumber)
Remove any artifacts stored for this plan result
|
void |
removeArtifacts(ResultsSummary resultsSummary)
Remove any artifacts stored for this plan result
|
void |
removeBuildLogs(ImmutablePlan plan,
int buildNumber)
Remove any build logs stored for this plan result
|
void |
removeBuildLogs(ImmutablePlan plan,
int buildNumber,
long maxIgnoredLogSize)
Remove build logs stored for this plan result that are greater than given size (in bytes).
|
void |
removeBuildLogs(ResultsSummary resultsSummary)
Remove any build logs stored for this plan result
|
void |
removeBuildLogs(ResultsSummary resultsSummary,
long maxIgnoredLogSize)
Remove build logs stored for this plan result that are greater than given size (in bytes).
|
void |
removeMatchingArtifacts(ResultsSummary resultsSummary,
com.google.common.base.Predicate<ArtifactLink> predicate)
Remove artifacts from results summary that match a predicate.
|
void |
removeMergeResultSummary(MergeResultSummary mergeResult)
Removes merge result.
|
int |
removeResultsSummariesForPlan(Plan plan)
Remove all resultSummary objects for the given plan.
|
void |
removeResultSummary(Plan plan,
int buildNumber)
Remove plan result summary and all associated objects.
|
void |
removeResultSummary(Plan plan,
ResultsSummary resultsSummary)
Remove plan result summary and all associated objects.
|
ResultsSummary |
resetResultSummary(BuildResultsSummary resultsSummary)
Prepare result summry to be reuse for plan rerun
|
void |
saveResultSummary(ResultsSummary resultsSummary)
Saves the
ResultsSummary |
long |
scrollResultSummaries(String buildKey,
com.google.common.base.Function<ResultsSummary,Void> function)
Scroll through and execute function for each of BuildResultsSummary
Objects passed to function are not fully initialized.
|
long |
scrollResultSummaries(String buildKey,
ResultDataRead resultDataRead,
com.google.common.base.Function<ResultsSummary,Void> function)
Scroll through and execute function for each of ResultsSummary (Build and Chain)
Objects passed to function are not fully initialized.
|
void |
updateCancelledDetails(ResultsSummary resultsSummary)
Deprecated.
since 5.4 use
com.atlassian.bamboo.resultsummary.ResultSummaryHelper#updateCancellationDetails(ResultsSummary, com.atlassian.bamboo.v2.build.BuildCancelledDetails) and saveResultSummary(ResultsSummary) |
void |
updateLifeCycleState(BuildContext buildContext,
LifeCycleState lifeCycleState,
BuildState buildState)
Update LifeCycleState and saves the
ResultsSummary for given BuildContext
Updates also timing information |
void |
updateLifeCycleState(ResultsSummary resultsSummary,
LifeCycleState lifeCycleState,
BuildState buildState)
Update LifeCycleState and saves the given
ResultsSummary |
void |
updatePlanCompletedDate(ChainResultsSummary resultsSummary,
Date completionDate)
Update completed date and duration of
ChainResultsSummary |
void |
updateProcessingDuration(ChainResultsSummary resultSummary)
Updates
ImmutableResultsSummary.getProcessingDuration() and ChainStageResult.getProcessingDuration()
based on chain execution. |
void |
updateResultSummaryWithBuildChanges(BuildContext buildContext) |
void |
updateVariablesOnContinuedBuild(ResultsSummary resultsSummary,
VariableContext variableContext)
Add manual variables added when starting manual stage or restarting failed stage.
|
<T extends ResultsSummary> T createResultsSummary(@NotNull BuildContext buildContext, @NotNull Class<T> aClass) throws ResultsSummaryCreationException
ResultsSummary of the given ClassT - buildContext - aClass - ResultsSummaryCreationException@Nullable ResultsSummary getResultsSummary(@NotNull PlanResultKey planResultKey)
PlanResultKeyplanResultKey - @Nullable ResultsSummary getResultsSummary(long id)
id - - database id@Nullable ResultsSummary getResultsSummary(@NotNull PlanResultKey planResultKey, ResultDataRead dataRead)
PlanResultKey. All lazy initialized collections can be eagerly fetched to avoid session problems.
Use with caution - expensive callplanResultKey - dataRead - @Nullable <T extends ResultsSummary> T getResultsSummary(@NotNull PlanResultKey planResultKey, @NotNull Class<T> aClass)
ResultsSummary by PlanResultKey and expected typeT - planResultKey - aClass - @Nullable <T extends ResultsSummary> T getResultsSummary(@NotNull PlanResultKey planResultKey, @NotNull Class<T> aClass, ResultDataRead dataRead)
ResultsSummary by PlanResultKey and expected type. All lazy initialized collections can be eagerly fetched to avoid session problems.
Use with caution - expensive callT - planResultKey - aClass - dataRead - void updateLifeCycleState(@NotNull
ResultsSummary resultsSummary,
@NotNull
LifeCycleState lifeCycleState,
@NotNull
BuildState buildState)
ResultsSummaryresultsSummary - ResultsSummary to be updated and savedlifeCycleState - LifeCycleState to be setbuildState - BuildState to be setvoid updateLifeCycleState(@NotNull
BuildContext buildContext,
@NotNull
LifeCycleState lifeCycleState,
@NotNull
BuildState buildState)
ResultsSummary for given BuildContext
Updates also timing informationbuildContext - BuildContext used to get information on ResultsSummarylifeCycleState - LifeCycleState to be setbuildState - BuildState to be setvoid updatePlanCompletedDate(@NotNull
ChainResultsSummary resultsSummary,
@NotNull
Date completionDate)
ChainResultsSummaryresultsSummary - completionDate - void calculateAndSetDeltaState(ResultsSummary resultsSummary)
resultsSummary - to updatevoid saveResultSummary(@NotNull
ResultsSummary resultsSummary)
ResultsSummaryresultsSummary - void addVariableContextSnapshotToResultSummary(@NotNull
ResultsSummary resultsSummary,
@NotNull
VariableContext variableContext)
resultsSummary - variableContext - void updateVariablesOnContinuedBuild(@NotNull
ResultsSummary resultsSummary,
@NotNull
VariableContext variableContext)
resultsSummary - variableContext - void clearVariablesOnRerunBuild(@NotNull
ResultsSummary resultSummary)
resultSummary - void postBuildVariableSnapshotUpdate(@NotNull
ResultsSummary resultsSummary,
@NotNull
VariableContext variableContext)
resultsSummary - variableContext - @NotNull <T extends ResultsSummary> Collection<T> getAllPendingResultSummaries(Class<T> aClass)
ResultsSummary in a LifeCycleState.PENDING state@NotNull <T extends ResultsSummary> Collection<T> getAllQueuedResultSummaries(Class<T> aClass)
ResultsSummary in a LifeCycleState.QUEUED state@NotNull <T extends ResultsSummary> Collection<T> getAllInProgressResultSummaries(Class<T> aClass)
ResultsSummary in a LifeCycleState.IN_PROGRESS stateaClass - @NotNull <T extends ResultsSummary> Collection<T> getAllActiveResultSummariesForPlan(PlanKey planKey, Class<T> aClass)
ResultsSummary in a LifeCycleState.IN_PROGRESS stateaClass - @NotNull <T extends ResultsSummary> List<T> getFinalizedResultSummariesForPlan(PlanKey planKey, Class<T> aClass, int firstResult, int maxResults)
ResultsSummary in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state with the given Class.
Results are sorted descending by build number.T - planKey - aClass - firstResult - - specifies the first result to be included in the list.maxResults - - specifies the length of the result; 0 for all results;@NotNull List<ResultsSummary> getNeighbouringSummaries(Plan plan, int buildNumber)
ResultsSummary objects that matches the passed build numbersplan - buildNumber - List of BuildResultsSummary@NotNull List<ResultsSummary> getNeighbouringSummaries(ImmutablePlan plan, int buildNumber, int neighbouringSummariesMaxCount)
ResultsSummary objects that matches the passed build numbersplan - buildNumber - neighbouringSummariesMaxCount - List of BuildResultsSummaryint getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
planKey - @NotNull <T extends ResultsSummary> Collection<T> getAllBuildResultSummariesInUnknownState(Class<T> aClass)
BuildResultsSummary in a BuildState.UNKNOWN
state@Nullable <T extends ResultsSummary> T findLastResultBefore(@NotNull PlanResultKey planResultKey, Class<T> aClass)
ResultsSummary before planResultKey.getBuildNumberplanResultKey - aClass - @Nullable <T extends ResultsSummary> T findLastResultBefore(@NotNull PlanResultKey planResultKey, Class<T> aClass, boolean includeOnceOffBuilds)
ResultsSummary before planResultKey.getBuildNumberplanResultKey - aClass - includeOnceOffBuilds - - should we skip once-off builds or include them in the search@Nullable ChainStageResult getChainStageResultById(@NotNull Long id)
ChainStageResult by its idlong getNumberOfResults()
ResultsSummaryslong getNumberOfFinishedResults(@NotNull
Plan plan)
plan - long getNumberOfFinalizedResults(@NotNull
ImmutablePlan plan)
ResultsSummarys in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state for the given Planplan - @NotNull <T extends ResultsSummary> List<T> getResultSummariesForPlan(@NotNull ImmutablePlan plan, int firstResult, int maxResults)
ResultsSummarys for the given Plan in any LifeCycleState. Results are sorted by build number (descending). User can skip first n result
and request maximum number of results.T - plan - firstResult - specifies the first item to be return (0 base index). Negative values treated as 0.maxResults - specifies amount of the results to be returned. Value <= 0 returns everything.@NotNull <T extends ResultsSummary> List<T> getResultSummariesForPlanByLifeCycleState(@NotNull Plan plan, @NotNull LifeCycleState lifeCycleState, int firstResult, int maxResults)
ResultsSummarys for the given Plan in give LifeCycleState that are Results are sorted by build number (descending). User
can skip first n result and request maximum number of results.T - plan - lifeCycleState - firstResult - specifies the first item to be return (0 base index). Negative values treated as 0.maxResults - specifies amount of the results to be returned. Value <= 0 returns everything.long getAveragePlanExecutionDuration(@NotNull
ImmutablePlan plan,
int numberOfResults)
plan - numberOfResults - amount of results to be taken into account for average calculation<T extends ResultsSummary> T getLastResultsSummary(@NotNull String planKey, Class<T> aClass)
ResultsSummary for planKey and ClassT - planKey - aClass - @Nullable ResultsSummary getLastSuccessfulResultSummary(@NotNull PlanKey planKey)
ResultsSummary for planKeyplanKey - int removeResultsSummariesForPlan(Plan plan)
ResultsSummary objects to be deleted
in such case #scheduleResultsSummariesForDelayedDeletion(Plan) should be considered.plan - to remove results for.ResultsSummarys removedint removeAllOrphanedResultSummaries()
ResultsSummary objects in the database that do not have a matching PlanResultsSummarys removed@Nullable ResultsSummary findFirstFailedBuildResultAfter(@NotNull String buildKey, int buildNumber)
ResultsSummary after buildNumberbuildKey - buildNumber - @Nullable @Deprecated ResultsSummary findFirstSuccessfulBuildResultAfter(@NotNull String buildKey, int buildNumber)
findFirstSuccessfulBuildResultAfter(PlanResultKey)ResultsSummary after buildNumberbuildKey - buildNumber - @Nullable ResultsSummary findFirstSuccessfulBuildResultAfter(@NotNull PlanResultKey planResultKey)
ResultsSummary after buildNumberplanResultKey - @Deprecated @Nullable ResultsSummary findLastSuccessfulBuildResultBefore(@NotNull ImmutablePlan build, int buildNumber)
findLastSuccessfulBuildResultBefore(PlanResultKey) instead. Since v5.2.ResultsSummary before buildNumberbuild - buildNumber - @Nullable ResultsSummary findLastSuccessfulBuildResultBefore(@NotNull PlanResultKey planResultKey)
ResultsSummary before buildplanResultKey - @Nullable ResultsSummary findLastFailingBuildResultBefore(@NotNull ImmutablePlan build, int buildNumber)
ResultsSummary before buildNumberbuild - buildNumber - @Nullable ResultsSummary findFirstFailedBuildResultBetween(@NotNull ImmutablePlan build, int lowerBuildNumber, int upperBuildNumber)
build - lowerBuildNumber - upperBuildNumber - @Nullable ResultsSummary findLastBuildResultBefore(@NotNull String buildKey, int buildNumber)
BuildResultsSummary before buildNumberbuildKey - buildNumber - @Nullable <T extends ResultsSummary> T findLastBuildResultBeforeWithTests(@NotNull PlanResultKey planResultKey, @NotNull Class<T> aClass, boolean includeOnceOffBuilds)
BuildResultsSummary before buildNumberplanResultKey - includeOnceOffBuilds - should once-off builds be considered or ignored in the searchaClass - @Nullable ResultsSummary getBreakingBuild(ResultsSummary buildResultsSummary)
buildResultsSummary - of the current build@Nullable ResultsSummary getFixingBuild(ResultsSummary buildResultsSummary)
ResultsSummary for given ResultsSummary. The input build
is returned if it is successful.buildResultsSummary - @Deprecated void updateCancelledDetails(@NotNull ResultsSummary resultsSummary)
com.atlassian.bamboo.resultsummary.ResultSummaryHelper#updateCancellationDetails(ResultsSummary, com.atlassian.bamboo.v2.build.BuildCancelledDetails) and saveResultSummary(ResultsSummary)List<ResultsSummary> getLatestResultSummaries()
List of ResultsSummaryList<ResultsSummary> getLatestFailedResultSummaries()
List of ResultsSummary@NotNull List<ResultsSummary> getLastNResultsSummaries(@NotNull ImmutablePlan plan, int numberOfResults)
plan - - to get the results fornumberOfResults - - number of summaries you would like@NotNull List<ResultsSummary> getLastNFailedResultsSummaries(@NotNull Plan build, int numberOfResults)
build - numberOfResults - must be > 0@NotNull @Deprecated List<BuildResultsSummary> getLastNBuildResultsSummaries(@NotNull ImmutableBuildable buildable, int numberOfResults)
getLastNResultsSummaries(com.atlassian.bamboo.plan.cache.ImmutablePlan, int) insteadbuildable - numberOfResults - must be > 0 @return@NotNull <T extends ResultsSummary> List<T> getResultSummaries(@NotNull ResultsSummaryCriteria criteria)
criteria - containing all the search constraints@NotNull <T extends ResultsSummary> List<T> getResultSummariesForExpiry(@NotNull ExpiryCriteria expiryCriteria)
result summaries according to the given criteria for
use in build expiry.T - type of returned results (determined by the criteria)expiryCriteria - search constraintsresults summaries matching the criteria@NotNull List<LinkedJiraIssue> findJiraIssuesForResults(@NotNull List<ResultsSummary> buildResults)
LinkedJiraIssue linked to the given build result summariesbuildResults - to look for issues attached toLinkedJiraIssue linked to the given build result summaries@Deprecated @NotNull List<LinkedJiraIssue> findJiraIssuesForPlan(@NotNull ImmutablePlan plan)
#findJiraIssuesForPlanKey(String)}LinkedJiraIssue linked to the given Planplan - to look for issues associated withLinkedJiraIssue linked to the given Plan@NotNull List<LinkedJiraIssue> findJiraIssuesForPlanKey(@NotNull PlanKey planKey)
LinkedJiraIssue linked to the given plan keyplanKey - to look for issues associated with plan of this keyLinkedJiraIssue linked to the given Plan@NotNull List<? extends ResultsSummary> findResultsSummariesByJiraIssues(@Nullable List<String> issueKeys)
issueKeys - to search for@NotNull List<? extends ResultsSummary> findResultsSummariesByProjectKey(@Nullable String projectKey)
projectKey - - jira project key@NotNull List<BuildResultsSummary> getAllBuildResultsSummariesForAgent(@NotNull Long agentId)
BuildResultsSummary for the passed BuildAgent's id.agentId - id of the agent to get the result summaries forBuildResultsSummary for the passed BuildAgent's id.@NotNull List<BuildResultsSummary> getLatestSummariesForAgent(@NotNull Long agentId, @NotNull Date fromDate)
agentId - id of an agentfromDate - beginning of the search periodList of BuildResultsSummary@NotNull List<BuildResultsSummary> getLatestSummariesForAgent(@NotNull Long agentId, int maxCount)
agentId - id of an agentmaxCount - maximum number of elements to retrieveList of BuildResultsSummary@Nullable BuildResultsSummary getLatestSummaryForAgent(long agentId)
@Nullable ChainResultsSummary getParentResultSummary(ResultsSummary resultsSummary)
ResultsSummaryresultsSummary - @Nullable ChainStageResult getStageForResult(ResultsSummary resultsSummary)
ResultsSummaryresultsSummary - void removeResultSummary(@NotNull
Plan plan,
int buildNumber)
plan - buildNumber - void removeResultSummary(@NotNull
Plan plan,
@NotNull
ResultsSummary resultsSummary)
plan - resultsSummary - void removeArtifacts(@NotNull
ImmutablePlan plan,
int buildNumber)
plan - buildNumber - void removeArtifacts(@NotNull
ResultsSummary resultsSummary)
resultsSummary - void removeMatchingArtifacts(@NotNull
ResultsSummary resultsSummary,
@NotNull
com.google.common.base.Predicate<ArtifactLink> predicate)
resultsSummary - predicate - void removeBuildLogs(ImmutablePlan plan, int buildNumber)
plan - buildNumber - void removeBuildLogs(@NotNull
ResultsSummary resultsSummary)
resultsSummary - void removeBuildLogs(ImmutablePlan plan, int buildNumber, long maxIgnoredLogSize)
plan - buildNumber - maxIgnoredLogSize - void removeBuildLogs(@NotNull
ResultsSummary resultsSummary,
long maxIgnoredLogSize)
resultsSummary - maxIgnoredLogSize - List<ChainResultsSummary> findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria, List<Label> labels)
criteria - containing the restrictions for the chains to be returnedlabels - that the jobs can be associated with@Deprecated void moveResultSummaries(PlanKey oldPlanKey, PlanKey newPlanKey)
moveResultSummaries(Plan, PlanKey, PlanKey)void moveResultSummaries(@NotNull
Plan newParentPlan,
@NotNull
PlanKey oldPlanKey,
@NotNull
PlanKey newPlanKey)
newParentPlan - the new parent plan of result summaries. This should be a plan, not a job.long scrollResultSummaries(@NotNull
String buildKey,
@NotNull
com.google.common.base.Function<ResultsSummary,Void> function)
buildKey - of the plan you want to scroll the result summaries forfunction - function to be executed on each of the BuildResultSummarylong scrollResultSummaries(@NotNull
String buildKey,
ResultDataRead resultDataRead,
@NotNull
com.google.common.base.Function<ResultsSummary,Void> function)
buildKey - of the plan you want to scroll the result summaries forresultDataRead - if the data should be loaded lazy or eagerlyfunction - function to be executed on each of the BuildResultSummary@Nullable <T extends ResultsSummary> T findFirstResultAfter(@NotNull PlanResultKey planResultKey, Class<T> aClass)
ResultsSummary after a specified build which is either FINISHED or can be FINISHED, i.e. is not
in NOT_BUILT state.planResultKey - aClass - @Nullable <T extends ResultsSummary> T findLastResultSummaryWithState(@NotNull PlanKey planKey, @NotNull BuildState buildState, @NotNull Class<T> aClass)
T - planKey - buildState - aClass - ResultsSummary with the provided BuildState@NotNull <T extends ResultsSummary> List<T> getResultSummariesByChangeSetId(@NotNull String changeSetId, @NotNull Class<T> discriminator)
T - extends ResultSummarychangeSetId - of the commitdiscriminator - class of the ResultSummary interface required@NotNull <T extends ResultsSummary> List<T> getResultSummariesByChangeSetIdAndRepository(long repositoryId, @NotNull String changeSetId, @NotNull Class<T> discriminator)
T - extends ResultSummaryrepositoryId - of the repositorychangeSetId - of the commitdiscriminator - class of the ResultSummary interface required@NotNull <T extends ResultsSummary> List<T> getResultSummariesByChangeSetIds(@NotNull List<String> changeSetIds, Class<T> discriminator)
T - extends ResultSummarychangeSetIds - of the commitdiscriminator - class of the ResultSummary interface required@NotNull <T extends ResultsSummary> List<T> getResultSummariesByChangeSetIds(@NotNull Iterable<Pair<String,RepositoryData>> changeSetIds, Class<T> discriminator)
T - extends ResultSummarychangeSetIds - of the commit anding with the repository that commit came fromdiscriminator - class of the ResultSummary interface required@NotNull List<UnassociatedCommit> getCommitsForUser(@NotNull String username, int max)
username - to filter commits bymax - maximum number of commits to get.int countResultsWithState(@NotNull
PlanKey planKey,
int lowerBuildNumber,
int upperBuildNumber,
@NotNull
BuildState buildState)
planKey - the key of plan to analyselowerBuildNumber - the build number to start the count withupperBuildNumber - the build number to end the count withbuildState - the state that will be countedvoid logVariablesForSubstitution(@NotNull
BuildContext buildContext,
@NotNull
ResultsSummary resultsSummary)
ResultsSummary
This method logs substitution before build was performed and is used basically to log substitution against plan result
as there will be no possibility to track it afterwardsvoid logSubstitutedVariables(@NotNull
BuildContext buildContext,
@NotNull
ResultsSummary resultsSummary)
ResultsSummary
This method logs substitution after it was performed and will use only REALLY substituted valuesvoid updateProcessingDuration(ChainResultsSummary resultSummary)
ImmutableResultsSummary.getProcessingDuration() and ChainStageResult.getProcessingDuration()
based on chain execution.resultSummary - int markResultSummariesForDeletion(@NotNull
PlanKey planKey)
ResultsSummary records in the database related to a Plan identified by planKey.planKey - key of a planvoid updateResultSummaryWithBuildChanges(@NotNull
BuildContext buildContext)
throws ResultsSummaryCreationException
ResultsSummaryCreationExceptionResultsSummary resetResultSummary(@NotNull BuildResultsSummary resultsSummary)
resultsSummary - void removeMergeResultSummary(@NotNull
MergeResultSummary mergeResult)
@Internal @NotNull List<PlanKey> getPlanKeysSortedByNumberOfFinalizedResultSummaries()
@Nullable Long calculateQueueDuration(@NotNull ChainResultsSummary resultsSummary)
resultsSummary - ChainResultsSummary for which calculation has to be madeBuildResultsSummary records@Nullable Long calculateVcsUpdateDuration(@NotNull ChainResultsSummary resultsSummary)
resultsSummary - ChainResultsSummary for which calculation has to be madeBuildResultsSummary recordsvoid invalidateLogSize(@NotNull
PlanResultKey planResultKey)
ResultsSummary with the given PlanResultKey.
For a BuildResultsSummary the ChainResultsSummary's max log size will also be invalidated.planResultKey - result keyCopyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.