|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl
public class BuildResultsSummaryManagerImpl
Constructor Summary | |
---|---|
BuildResultsSummaryManagerImpl()
|
Method Summary | ||
---|---|---|
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. |
|
int |
countBuildResultsSummaries()
Returns the number of results saved |
|
int |
countBuildResultsSummariesForAgent(BuildAgent buildAgent)
|
|
int |
countFailedBuildResultsSummariesForAgent(BuildAgent buildAgent)
|
|
int |
countResultsWithState(PlanKey planKey,
int lowerBuildNumber,
int upperBuildNumber,
BuildState buildState)
Counts results with a given state in a given build number range for plan. |
|
|
createResultsSummary(BuildContext buildContext,
java.lang.Class<T> aClass)
Creates a ResultsSummary of the given Class |
|
|
createResultsSummary(ChainResultsSummary chainResultsSummary,
BuildContext buildContext,
java.lang.Class<T> aClass)
|
|
java.util.List<ChainResultsSummary> |
findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria,
java.util.List<Label> labels)
Searches through all chains to find any that have jobs which match the given labels. |
|
ResultsSummary |
findFirstFailedBuildResultAfter(java.lang.String buildKey,
int buildNumber)
Finds the first failed ResultsSummary after buildNumber |
|
ResultsSummary |
findFirstFailedBuildResultBetween(Plan build,
int lowerBuildNumber,
int upperBuildNumber)
Finds the first failed build between the upper and lower build numbers inclusively. |
|
|
findFirstResultAfter(PlanResultKey planResultKey,
java.lang.Class<T> aClass)
Finds the first ResultsSummary after a specified build which is either FINISHED or can be FINISHED, i.e. |
|
ResultsSummary |
findFirstSuccessfulBuildResultAfter(java.lang.String buildKey,
int buildNumber)
Finds the last successful BuildResultsSummary after buildNumber |
|
java.util.List<LinkedJiraIssue> |
findJiraIssuesForPlan(Plan plan)
Retrieves a list of LinkedJiraIssue linked to the given Plan |
|
java.util.List<LinkedJiraIssue> |
findJiraIssuesForResults(java.util.List<ResultsSummary> buildResults)
Retrieves a list of LinkedJiraIssue linked to the given build result summaries |
|
ResultsSummary |
findLastBuildResultBefore(java.lang.String buildKey,
int buildNumber)
Finds the last successful or failing BuildResultsSummary before buildNumber |
|
|
findLastBuildResultBeforeWithTests(PlanResultKey planResultKey,
java.lang.Class<T> aClass)
Finds the last successful or failing BuildResultsSummary before buildNumber |
|
ResultsSummary |
findLastFailingBuildResultBefore(Plan build,
int buildNumber)
Finds the last failing BuildResultsSummary before buildNumber |
|
|
findLastResultBefore(PlanResultKey planResultKey,
java.lang.Class<T> aClass)
Finds the last successful or failing ResultsSummary before planResultKey.getBuildNumber |
|
|
findLastResultSummaryWithState(PlanKey planKey,
BuildState buildState,
java.lang.Class<T> aClass)
|
|
ResultsSummary |
findLastSuccessfulBuildResultBefore(Plan build,
int buildNumber)
Finds the last successful BuildResultsSummary before buildNumber |
|
java.util.List<? extends ResultsSummary> |
findResultsSummariesByJiraIssues(java.util.List<java.lang.String> issueKeys)
Finds a list of results which are linked to the given issue keys |
|
java.util.List<? extends ResultsSummary> |
findResultsSummariesByProjectKey(java.lang.String projectKey)
Provide a list of results which are linked to any issues under the given jira project key |
|
|
getAllActiveResultSummariesForPlan(PlanKey planKey,
java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.IN_PROGRESS state |
|
java.util.List<BuildResultsSummary> |
getAllBuildResultsSummaries(Plan plan)
Returns all BuildResultsSummary for the passed Plan . |
|
java.util.List<BuildResultsSummary> |
getAllBuildResultsSummariesForAgent(java.lang.Long agentId)
Returns all BuildResultsSummary for the passed BuildAgent 's id. |
|
|
getAllBuildResultSummariesInUnknownState(java.lang.Class<T> aClass)
Returns all the BuildResultsSummary in a BuildState.UNKNOWN
state |
|
|
getAllInProgressResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.IN_PROGRESS state |
|
|
getAllPendingResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.PENDING state |
|
|
getAllQueuedResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.QUEUED state |
|
|
getAllResultSummariesForPlan(Plan plan)
Get all the ResultsSummary s for the given Plan . |
|
long |
getAverageBuildTime(Buildable plan,
int numberOfResults)
Returns average build duration for given number of builds |
|
long |
getAveragePlanExecutionDuration(Plan 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. |
|
BuildResultsSummary |
getBuildResultsSummary(PlanResultKey planResultKey)
Gets the BuildResultsSummary represented by the provided PlanResultKey |
|
BuildResultsSummary |
getBuildResultsSummary(java.lang.String buildKey,
int buildNumber)
Gets the BuildResultsSummary represented by the provided buildKey and buildNumber |
|
ChainStageResult |
getChainStageResultById(java.lang.Long id)
Returns a ChainStageResult by its id |
|
java.util.List<UnassociatedCommit> |
getCommitsForUser(java.lang.String username,
int max)
Retrieve a list of recent Commits for the given user. |
|
|
getFinalizedResultSummariesForPlan(PlanKey planKey,
java.lang.Class<T> aClass,
int firstResult,
int maxResults)
Returns all the ResultsSummary in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state with the given Class . |
|
BuildResultsSummary |
getFirstBuildSummary(Plan plan)
Retreives the first result |
|
ResultsSummary |
getFixingBuild(ResultsSummary buildResultsSummary)
Returns the first successful ResultsSummary for given ResultsSummary . |
|
BuildResultsSummary |
getLastBuildForAgent(java.lang.String planKey,
java.lang.Long agentId)
|
|
BuildResultsSummary |
getLastBuildForImageConfiguration(java.lang.String planKey,
ElasticImageConfiguration configuration)
|
|
BuildResultsSummary |
getLastBuildSummary(Plan plan)
Retrieves the last completed build result for a plan |
|
java.util.List<BuildResultsSummary> |
getLastNBuildResultsSummaries(Buildable buildable,
int numberOfResults)
Deprecated. |
|
java.util.List<ResultsSummary> |
getLastNFailedResultsSummaries(Plan plan,
int numberOfResults)
Returns the most recent n failed build results. |
|
java.util.List<ResultsSummary> |
getLastNResultsSummaries(Plan plan,
int numberOfResults)
Provides a list of the latest N results summaries for the given plan, newest first. |
|
|
getLastResultsSummary(java.lang.String planKey,
java.lang.Class<T> aClass)
Get the last ResultsSummary for planKey and Class |
|
BuildResultsSummary |
getLastSuccessfulBuildForAgent(java.lang.String planKey,
java.lang.Long agentId)
|
|
BuildResultsSummary |
getLastSuccessfulBuildSummary(java.lang.String planKey)
|
|
ResultsSummary |
getLastSuccessfulResultSummary(PlanKey planKey)
Get the last successful ResultsSummary for planKey |
|
java.util.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 |
|
java.util.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 |
|
java.util.List<BuildResultsSummary> |
getLatestSummariesForAgent(java.lang.Long agentId,
java.util.Date fromDate)
Retrieves build summaries for agent id not older than certain date. |
|
java.util.List<BuildResultsSummary> |
getLatestSummariesForAgent(java.lang.Long agentId,
int maxCount)
Retrieves n last build summaries for agent. |
|
BuildResultsSummary |
getLatestSummaryForAgent(long agentId)
|
|
java.util.List<ResultsSummary> |
getNeighbouringSummaries(ImmutablePlan plan,
int buildNumber,
int neighbouringSummariesMaxCount)
Returns all the ResultsSummary objects that matches the passed build numbers |
|
java.util.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(Plan plan)
Get number of the ResultsSummary s in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state for the given Plan |
|
long |
getNumberOfFinishedResults(Plan plan)
Get number of the ResultsSummary s in LifeCycleState.FINISHED state for the given Plan |
|
ChainResultsSummary |
getParentResultSummary(ResultsSummary resultsSummary)
Get (@link ChainResultsSummary} containing given ResultsSummary |
|
ResultsSummary |
getResultsSummary(PlanResultKey planResultKey)
Lookup the ResultsSummary by PlanResultKey |
|
|
getResultsSummary(PlanResultKey planResultKey,
java.lang.Class<T> aClass)
Lookup ResultsSummary by PlanResultKey and expected type |
|
|
getResultsSummary(PlanResultKey planResultKey,
java.lang.Class<T> aClass,
ResultDataRead dataRead)
Lookup ResultsSummary by PlanResultKey and expected type. |
|
ResultsSummary |
getResultsSummary(PlanResultKey planResultKey,
ResultDataRead dataRead)
Lookup the ResultsSummary by PlanResultKey . |
|
|
getResultSummaries(ResultsSummaryCriteria resultsSummaryCriteria)
Generic search to find any result summaries bases on the criteria provided. |
|
|
getResultSummariesByChangeSetId(java.lang.String changeSetId,
java.lang.Class<T> discriminator)
Get a list of all build results containing a commit with the given change set ID. |
|
|
getResultSummariesForPlan(ImmutablePlan plan,
int firstResult,
int maxResults)
Get the ResultsSummary s for the given Plan in any LifeCycleState . |
|
|
getResultSummariesForPlanByLifeCycleState(Plan plan,
LifeCycleState lifeCycleState,
int firstResult,
int maxResults)
Get the ResultsSummary s 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 |
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)
Reassigns plan key ResultsSummaries associated with selected plan key. |
|
void |
moveResultSummaries(Plan newParentPlan,
PlanKey oldPlanKey,
PlanKey newPlanKey)
Reassigns plan key ResultsSummaries associated with selected plan key. |
|
int |
removeAllOrphanedResultSummaries()
Removes all the ResultsSummary objects in the database that do not have a matching Plan |
|
void |
removeArtifacts(Plan plan,
int buildNumber)
Remove any artifacts stored for this plan result |
|
void |
removeBuildLogs(Plan plan,
int buildNumber)
Remove any build logs stored for this plan result |
|
void |
removeBuildResult(Buildable buildable,
int buildNumber)
Removes a build result for a particular build. |
|
void |
removeMatchingArtifacts(ResultsSummary resultsSummary,
com.google.common.base.Predicate<ArtifactLink> predicate)
Remove artifacts from results summary that match a predicate. |
|
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 |
saveBuildResultsSummary(BuildResultsSummary buildResultsSummary)
Saves the specified BuildResultsSummary |
|
void |
saveResultSummary(ResultsSummary resultsSummary)
Saves the ResultsSummary |
|
long |
scrollResultSummaries(java.lang.String buildKey,
com.google.common.base.Function<ResultsSummary,java.lang.Void> function)
Scroll through and execute function for each of BuildResultsSummary Objects passed to function are not fully initialized. |
|
long |
scrollResultSummaries(java.lang.String buildKey,
ResultDataRead resultDataRead,
com.google.common.base.Function<ResultsSummary,java.lang.Void> function)
Scroll through and execute function for each of BuildResultsSummary Objects passed to function are not fully initialized. |
|
void |
setArtifactLinkManager(ArtifactLinkManager artifactLinkManager)
|
|
void |
setBuildExecutionManager(BuildExecutionManager buildExecutionManager)
|
|
void |
setBuildResultsIndexer(BuildResultsIndexer buildResultsIndexer)
|
|
void |
setBuildResultsSummaryDao(BuildResultsSummaryDao buildResultsSummaryDao)
|
|
void |
setCommitDao(CommitDao commitDao)
|
|
void |
setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
|
|
void |
setExtendedAuthorManager(ExtendedAuthorManager extendedAuthorManager)
|
|
void |
setImmutablePlanCacheService(ImmutablePlanCacheService immutablePlanCacheService)
|
|
void |
setJiraIssueUtils(JiraIssueUtils jiraIssueUtils)
|
|
void |
setRepositoryDefinitionManager(RepositoryDefinitionManager repositoryDefinitionManager)
|
|
void |
setTestsManager(TestsManager testsManager)
|
|
BuildResultsSummary |
updateBuildSummaryFromBuildResults(BuildContext buildContext,
CurrentlyBuilding currentlyBuilding,
BuildResults buildResults)
Updates BuildResultsSummary after build is completed. |
|
void |
updateCancelledDetails(ResultsSummary resultsSummary)
Marks ResultSummary as cancelled |
|
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 resultSummary,
java.util.Date completionDate)
Update completed date and duration of ChainResultsSummary |
|
void |
updateProcessingDuration(ChainResultsSummary resultSummary)
Updates ResultsSummary.getProcessingDuration() and ChainStageResult.getProcessingDuration()
based on chain execution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BuildResultsSummaryManagerImpl()
Method Detail |
---|
@NotNull public <T extends ResultsSummary> java.util.List<T> getAllResultSummariesForPlan(@NotNull Plan plan)
ResultsSummaryManager
ResultsSummary
s for the given Plan
. This can be thousands of objects or just a few. Avoid using this method at all costs.
getAllResultSummariesForPlan
in interface ResultsSummaryManager
@NotNull public <T extends ResultsSummary> java.util.List<T> getResultSummariesForPlanByLifeCycleState(@NotNull Plan plan, @NotNull LifeCycleState lifeCycleState, int firstResult, int maxResults)
ResultsSummaryManager
ResultsSummary
s 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.
getResultSummariesForPlanByLifeCycleState
in interface ResultsSummaryManager
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 public <T extends ResultsSummary> java.util.List<T> getResultSummariesForPlan(@NotNull ImmutablePlan plan, int firstResult, int maxResults)
ResultsSummaryManager
ResultsSummary
s 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.
getResultSummariesForPlan
in interface ResultsSummaryManager
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.
@Nullable public ChainStageResult getChainStageResultById(@NotNull java.lang.Long id)
ResultsSummaryManager
ChainStageResult
by its id
getChainStageResultById
in interface ResultsSummaryManager
@Nullable public ResultsSummary getResultsSummary(@NotNull PlanResultKey planResultKey)
ResultsSummaryManager
PlanResultKey
getResultsSummary
in interface ResultsSummaryManager
@Nullable public ResultsSummary getResultsSummary(@NotNull PlanResultKey planResultKey, ResultDataRead dataRead)
ResultsSummaryManager
PlanResultKey
. All lazy initialized collections can be eagerly fetched to avoid session problems.
Use with caution - expensive call
getResultsSummary
in interface ResultsSummaryManager
@Nullable public <T extends ResultsSummary> T getResultsSummary(@NotNull PlanResultKey planResultKey, @NotNull java.lang.Class<T> aClass)
ResultsSummaryManager
ResultsSummary
by PlanResultKey
and expected type
getResultsSummary
in interface ResultsSummaryManager
@Nullable public <T extends ResultsSummary> T getResultsSummary(@NotNull PlanResultKey planResultKey, @NotNull java.lang.Class<T> aClass, ResultDataRead dataRead)
ResultsSummaryManager
ResultsSummary
by PlanResultKey
and expected type. All lazy initialized collections can be eagerly fetched to avoid session problems.
Use with caution - expensive call
getResultsSummary
in interface ResultsSummaryManager
@NotNull public <T extends ResultsSummary> java.util.Collection<T> getAllPendingResultSummaries(java.lang.Class<T> aClass)
ResultsSummaryManager
ResultsSummary
in a LifeCycleState.PENDING
state
getAllPendingResultSummaries
in interface ResultsSummaryManager
@NotNull public <T extends ResultsSummary> java.util.Collection<T> getAllQueuedResultSummaries(java.lang.Class<T> aClass)
ResultsSummaryManager
ResultsSummary
in a LifeCycleState.QUEUED
state
getAllQueuedResultSummaries
in interface ResultsSummaryManager
@NotNull public <T extends ResultsSummary> java.util.Collection<T> getAllInProgressResultSummaries(java.lang.Class<T> aClass)
ResultsSummaryManager
ResultsSummary
in a LifeCycleState.IN_PROGRESS
state
getAllInProgressResultSummaries
in interface ResultsSummaryManager
@NotNull public <T extends ResultsSummary> java.util.Collection<T> getAllActiveResultSummariesForPlan(PlanKey planKey, java.lang.Class<T> aClass)
ResultsSummaryManager
ResultsSummary
in a LifeCycleState.IN_PROGRESS
state
getAllActiveResultSummariesForPlan
in interface ResultsSummaryManager
@NotNull public <T extends ResultsSummary> java.util.List<T> getFinalizedResultSummariesForPlan(PlanKey planKey, java.lang.Class<T> aClass, int firstResult, int maxResults)
ResultsSummaryManager
ResultsSummary
in a LifeCycleState.FINISHED
or LifeCycleState.NOT_BUILT
state with the given Class
.
Results are sorted descending by build number.
getFinalizedResultSummariesForPlan
in interface ResultsSummaryManager
firstResult
- - specifies the first result to be included in the list.maxResults
- - specifies the length of the result; 0 for all results;
public int getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
ResultsSummaryManager
getNumberOfConcurrentlyRunningBuilds
in interface ResultsSummaryManager
@NotNull public <T extends ResultsSummary> java.util.Collection<T> getAllBuildResultSummariesInUnknownState(java.lang.Class<T> aClass)
ResultsSummaryManager
BuildResultsSummary
in a BuildState.UNKNOWN
state
getAllBuildResultSummariesInUnknownState
in interface ResultsSummaryManager
public <T extends ResultsSummary> T createResultsSummary(@NotNull BuildContext buildContext, @NotNull java.lang.Class<T> aClass) throws ResultsSummaryCreationException
ResultsSummaryManager
ResultsSummary
of the given Class
createResultsSummary
in interface ResultsSummaryManager
ResultsSummaryCreationException
public <T extends ResultsSummary> T createResultsSummary(@Nullable ChainResultsSummary chainResultsSummary, @NotNull BuildContext buildContext, @NotNull java.lang.Class<T> aClass) throws ResultsSummaryCreationException
createResultsSummary
in interface BuildResultsSummaryManager
ResultsSummaryCreationException
@NotNull public BuildResultsSummary updateBuildSummaryFromBuildResults(BuildContext buildContext, CurrentlyBuilding currentlyBuilding, BuildResults buildResults)
BuildResultsSummaryManager
updateBuildSummaryFromBuildResults
in interface BuildResultsSummaryManager
public void calculateAndSetDeltaState(ResultsSummary resultsSummary)
ResultsSummaryManager
calculateAndSetDeltaState
in interface ResultsSummaryManager
resultsSummary
- to updatepublic void updateLifeCycleState(@NotNull ResultsSummary resultsSummary, @NotNull LifeCycleState lifeCycleState, @NotNull BuildState buildState)
ResultsSummaryManager
ResultsSummary
updateLifeCycleState
in interface ResultsSummaryManager
resultsSummary
- ResultsSummary to be updated and savedlifeCycleState
- LifeCycleState to be setbuildState
- BuildState to be setpublic void updateLifeCycleState(@NotNull BuildContext buildContext, @NotNull LifeCycleState lifeCycleState, @NotNull BuildState buildState)
ResultsSummaryManager
ResultsSummary
for given BuildContext
Updates also timing information
updateLifeCycleState
in interface ResultsSummaryManager
buildContext
- BuildContext used to get information on ResultsSummarylifeCycleState
- LifeCycleState to be setbuildState
- BuildState to be setpublic void updatePlanCompletedDate(@NotNull ChainResultsSummary resultSummary, @NotNull java.util.Date completionDate)
ResultsSummaryManager
ChainResultsSummary
updatePlanCompletedDate
in interface ResultsSummaryManager
public void updateProcessingDuration(ChainResultsSummary resultSummary)
ResultsSummaryManager
ResultsSummary.getProcessingDuration()
and ChainStageResult.getProcessingDuration()
based on chain execution.
updateProcessingDuration
in interface ResultsSummaryManager
public int markResultSummariesForDeletion(@NotNull PlanKey planKey)
ResultsSummaryManager
ResultsSummary
records in the database related to a Plan identified by planKey.
markResultSummariesForDeletion
in interface ResultsSummaryManager
planKey
- key of a plan
@Nullable public ResultsSummary getBreakingBuild(ResultsSummary buildResultsSummary)
ResultsSummaryManager
getBreakingBuild
in interface ResultsSummaryManager
buildResultsSummary
- of the current build
@Nullable public ResultsSummary getFixingBuild(ResultsSummary buildResultsSummary)
ResultsSummaryManager
ResultsSummary
for given ResultsSummary
. The input build
is returned if it is successful.
getFixingBuild
in interface ResultsSummaryManager
@NotNull public java.util.List<BuildResultsSummary> getAllBuildResultsSummaries(@NotNull Plan plan)
BuildResultsSummaryManager
BuildResultsSummary
for the passed Plan
. Sorted by oldest first.
getAllBuildResultsSummaries
in interface BuildResultsSummaryManager
@Deprecated @NotNull public java.util.List<BuildResultsSummary> getLastNBuildResultsSummaries(@NotNull Buildable buildable, int numberOfResults)
ResultsSummaryManager
getLastNBuildResultsSummaries
in interface ResultsSummaryManager
numberOfResults
- must be > 0 @return
@NotNull public <T extends ResultsSummary> java.util.List<T> getResultSummaries(@NotNull ResultsSummaryCriteria resultsSummaryCriteria)
ResultsSummaryManager
getResultSummaries
in interface ResultsSummaryManager
resultsSummaryCriteria
- containing all the search constraints
@NotNull public java.util.List<ResultsSummary> getLastNResultsSummaries(@NotNull Plan plan, int numberOfResults)
ResultsSummaryManager
getLastNResultsSummaries
in interface ResultsSummaryManager
plan
- - to get the results fornumberOfResults
- - number of summaries you would like
@NotNull public java.util.List<ResultsSummary> getLastNFailedResultsSummaries(@NotNull Plan plan, int numberOfResults)
ResultsSummaryManager
getLastNFailedResultsSummaries
in interface ResultsSummaryManager
numberOfResults
- must be > 0
public int countBuildResultsSummaries()
BuildResultsSummaryManager
countBuildResultsSummaries
in interface BuildResultsSummaryManager
@NotNull public java.util.List<? extends ResultsSummary> findResultsSummariesByJiraIssues(@Nullable java.util.List<java.lang.String> issueKeys)
ResultsSummaryManager
findResultsSummariesByJiraIssues
in interface ResultsSummaryManager
issueKeys
- to search for
@NotNull public java.util.List<? extends ResultsSummary> findResultsSummariesByProjectKey(@Nullable java.lang.String projectKey)
ResultsSummaryManager
findResultsSummariesByProjectKey
in interface ResultsSummaryManager
projectKey
- - jira project key
@NotNull public java.util.List<LinkedJiraIssue> findJiraIssuesForResults(@NotNull java.util.List<ResultsSummary> buildResults)
ResultsSummaryManager
LinkedJiraIssue
linked to the given build result summaries
findJiraIssuesForResults
in interface ResultsSummaryManager
buildResults
- to look for issues attached to
LinkedJiraIssue
linked to the given build result summaries@NotNull public java.util.List<LinkedJiraIssue> findJiraIssuesForPlan(@NotNull Plan plan)
ResultsSummaryManager
LinkedJiraIssue
linked to the given Plan
findJiraIssuesForPlan
in interface ResultsSummaryManager
plan
- to look for issues associated with
LinkedJiraIssue
linked to the given Plan
public void removeResultSummary(@NotNull Plan plan, int buildNumber)
ResultsSummaryManager
removeResultSummary
in interface ResultsSummaryManager
public void removeBuildResult(Buildable buildable, int buildNumber)
BuildResultsSummaryManager
removeBuildResult
in interface BuildResultsSummaryManager
buildNumber
- The build number.public void removeBuildLogs(Plan plan, int buildNumber)
ResultsSummaryManager
removeBuildLogs
in interface ResultsSummaryManager
public void removeMatchingArtifacts(@NotNull ResultsSummary resultsSummary, @NotNull com.google.common.base.Predicate<ArtifactLink> predicate)
ResultsSummaryManager
removeMatchingArtifacts
in interface ResultsSummaryManager
public void removeArtifacts(Plan plan, int buildNumber)
ResultsSummaryManager
removeArtifacts
in interface ResultsSummaryManager
public java.util.List<ChainResultsSummary> findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria, java.util.List<Label> labels)
ResultsSummaryManager
findChainResultsWithJobLabelled
in interface ResultsSummaryManager
criteria
- containing the restrictions for the chains to be returnedlabels
- that the jobs can be associated with
@NotNull public java.util.List<ResultsSummary> getNeighbouringSummaries(Plan plan, int buildNumber)
ResultsSummaryManager
ResultsSummary
objects that matches the passed build numbers
getNeighbouringSummaries
in interface ResultsSummaryManager
List
of BuildResultsSummary
@NotNull public java.util.List<ResultsSummary> getNeighbouringSummaries(ImmutablePlan plan, int buildNumber, int neighbouringSummariesMaxCount)
ResultsSummaryManager
ResultsSummary
objects that matches the passed build numbers
getNeighbouringSummaries
in interface ResultsSummaryManager
List
of BuildResultsSummary
public int removeResultsSummariesForPlan(@NotNull Plan plan)
ResultsSummaryManager
ResultsSummary
objects to be deleted
in such case #scheduleResultsSummariesForDelayedDeletion(Plan)
should be considered.
removeResultsSummariesForPlan
in interface ResultsSummaryManager
plan
- to remove results for.
ResultsSummary
s removedpublic int removeAllOrphanedResultSummaries()
ResultsSummaryManager
ResultsSummary
objects in the database that do not have a matching Plan
removeAllOrphanedResultSummaries
in interface ResultsSummaryManager
ResultsSummary
s removed@Nullable public BuildResultsSummary getBuildResultsSummary(@NotNull PlanResultKey planResultKey)
BuildResultsSummaryManager
BuildResultsSummary
represented by the provided PlanResultKey
getBuildResultsSummary
in interface BuildResultsSummaryManager
@Nullable public BuildResultsSummary getBuildResultsSummary(java.lang.String buildKey, int buildNumber)
BuildResultsSummaryManager
BuildResultsSummary
represented by the provided buildKey and buildNumber
getBuildResultsSummary
in interface BuildResultsSummaryManager
public void saveBuildResultsSummary(@NotNull BuildResultsSummary buildResultsSummary)
BuildResultsSummaryManager
BuildResultsSummary
saveBuildResultsSummary
in interface BuildResultsSummaryManager
public void saveResultSummary(@NotNull ResultsSummary resultsSummary)
ResultsSummaryManager
ResultsSummary
saveResultSummary
in interface ResultsSummaryManager
@Nullable public BuildResultsSummary getFirstBuildSummary(Plan plan)
BuildResultsSummaryManager
getFirstBuildSummary
in interface BuildResultsSummaryManager
@Nullable public BuildResultsSummary getLastBuildSummary(@NotNull Plan plan)
BuildResultsSummaryManager
getLastBuildSummary
in interface BuildResultsSummaryManager
plan
- plan of which build result will be searched
public BuildResultsSummary getLastSuccessfulBuildSummary(@NotNull java.lang.String planKey)
getLastSuccessfulBuildSummary
in interface BuildResultsSummaryManager
public ResultsSummary getLastSuccessfulResultSummary(@NotNull PlanKey planKey)
ResultsSummaryManager
ResultsSummary
for planKey
getLastSuccessfulResultSummary
in interface ResultsSummaryManager
@Nullable public BuildResultsSummary getLastBuildForAgent(@NotNull java.lang.String planKey, @NotNull java.lang.Long agentId)
getLastBuildForAgent
in interface BuildResultsSummaryManager
@Nullable public BuildResultsSummary getLastBuildForImageConfiguration(@NotNull java.lang.String planKey, @NotNull ElasticImageConfiguration configuration)
getLastBuildForImageConfiguration
in interface BuildResultsSummaryManager
@Nullable public BuildResultsSummary getLastSuccessfulBuildForAgent(@NotNull java.lang.String planKey, @NotNull java.lang.Long agentId)
getLastSuccessfulBuildForAgent
in interface BuildResultsSummaryManager
public int countBuildResultsSummariesForAgent(@NotNull BuildAgent buildAgent)
countBuildResultsSummariesForAgent
in interface BuildResultsSummaryManager
public int countFailedBuildResultsSummariesForAgent(@NotNull BuildAgent buildAgent)
countFailedBuildResultsSummariesForAgent
in interface BuildResultsSummaryManager
@Nullable public ResultsSummary findLastSuccessfulBuildResultBefore(@NotNull Plan build, int buildNumber)
ResultsSummaryManager
BuildResultsSummary
before buildNumber
findLastSuccessfulBuildResultBefore
in interface ResultsSummaryManager
@Nullable public <T extends ResultsSummary> T findFirstResultAfter(@NotNull PlanResultKey planResultKey, java.lang.Class<T> aClass)
ResultsSummaryManager
ResultsSummary
after a specified build which is either FINISHED or can be FINISHED, i.e. is not
in NOT_BUILT state.
findFirstResultAfter
in interface ResultsSummaryManager
@Nullable public <T extends ResultsSummary> T findLastResultBefore(@NotNull PlanResultKey planResultKey, java.lang.Class<T> aClass)
ResultsSummaryManager
ResultsSummary
before planResultKey.getBuildNumber
findLastResultBefore
in interface ResultsSummaryManager
public <T extends ResultsSummary> T findLastResultSummaryWithState(@NotNull PlanKey planKey, @NotNull BuildState buildState, @NotNull java.lang.Class<T> aClass)
findLastResultSummaryWithState
in interface ResultsSummaryManager
ResultsSummary
with the provided BuildState
@NotNull public <T extends ResultsSummary> java.util.List<ResultWithPlanInfo<T>> getResultSummariesByChangeSetId(@NotNull java.lang.String changeSetId, java.lang.Class<T> discriminator)
ResultsSummaryManager
getResultSummariesByChangeSetId
in interface ResultsSummaryManager
T
- extends ResultSummarychangeSetId
- of the commitdiscriminator
- class of the ResultSummary interface required
@NotNull public java.util.List<UnassociatedCommit> getCommitsForUser(@NotNull java.lang.String username, int max)
ResultsSummaryManager
getCommitsForUser
in interface ResultsSummaryManager
username
- to filter commits bymax
- maximum number of commits to get.
@Nullable public ResultsSummary findLastBuildResultBefore(@NotNull java.lang.String buildKey, int buildNumber)
ResultsSummaryManager
BuildResultsSummary
before buildNumber
findLastBuildResultBefore
in interface ResultsSummaryManager
public <T extends ResultsSummary> T findLastBuildResultBeforeWithTests(@NotNull PlanResultKey planResultKey, @NotNull java.lang.Class<T> aClass)
ResultsSummaryManager
BuildResultsSummary
before buildNumber
findLastBuildResultBeforeWithTests
in interface ResultsSummaryManager
@Nullable public ResultsSummary findFirstFailedBuildResultAfter(@NotNull java.lang.String buildKey, int buildNumber)
ResultsSummaryManager
ResultsSummary
after buildNumber
findFirstFailedBuildResultAfter
in interface ResultsSummaryManager
@Nullable public ResultsSummary findFirstSuccessfulBuildResultAfter(@NotNull java.lang.String buildKey, int buildNumber)
ResultsSummaryManager
BuildResultsSummary
after buildNumber
findFirstSuccessfulBuildResultAfter
in interface ResultsSummaryManager
@Nullable public ResultsSummary findLastFailingBuildResultBefore(@NotNull Plan build, int buildNumber)
ResultsSummaryManager
BuildResultsSummary
before buildNumber
findLastFailingBuildResultBefore
in interface ResultsSummaryManager
@Nullable public ResultsSummary findFirstFailedBuildResultBetween(@NotNull Plan build, int lowerBuildNumber, int upperBuildNumber)
ResultsSummaryManager
findFirstFailedBuildResultBetween
in interface ResultsSummaryManager
@NotNull public java.util.List<BuildResultsSummary> getAllBuildResultsSummariesForAgent(@NotNull java.lang.Long agentId)
ResultsSummaryManager
BuildResultsSummary
for the passed BuildAgent
's id.
getAllBuildResultsSummariesForAgent
in interface ResultsSummaryManager
agentId
- id of the agent to get the result summaries for
BuildResultsSummary
for the passed BuildAgent
's id.@NotNull public java.util.List<BuildResultsSummary> getLatestSummariesForAgent(@NotNull java.lang.Long agentId, @NotNull java.util.Date fromDate)
ResultsSummaryManager
getLatestSummariesForAgent
in interface ResultsSummaryManager
agentId
- id of an agentfromDate
- beginning of the search period
List
of BuildResultsSummary
@NotNull public java.util.List<BuildResultsSummary> getLatestSummariesForAgent(@NotNull java.lang.Long agentId, int maxCount)
ResultsSummaryManager
getLatestSummariesForAgent
in interface ResultsSummaryManager
agentId
- id of an agentmaxCount
- maximum number of elements to retrieve
List
of BuildResultsSummary
@Nullable public BuildResultsSummary getLatestSummaryForAgent(long agentId)
getLatestSummaryForAgent
in interface ResultsSummaryManager
@Nullable public ChainResultsSummary getParentResultSummary(ResultsSummary resultsSummary)
ResultsSummaryManager
ResultsSummary
getParentResultSummary
in interface ResultsSummaryManager
@Nullable public ChainStageResult getStageForResult(ResultsSummary resultsSummary)
ResultsSummaryManager
ResultsSummary
getStageForResult
in interface ResultsSummaryManager
public long getNumberOfFinishedResults(@NotNull Plan plan)
ResultsSummaryManager
ResultsSummary
s in LifeCycleState.FINISHED
state for the given Plan
getNumberOfFinishedResults
in interface BuildResultsSummaryManager
getNumberOfFinishedResults
in interface ResultsSummaryManager
public long getNumberOfFinalizedResults(@NotNull Plan plan)
ResultsSummaryManager
ResultsSummary
s in a LifeCycleState.FINISHED
or LifeCycleState.NOT_BUILT
state for the given Plan
getNumberOfFinalizedResults
in interface ResultsSummaryManager
public java.util.List<ResultsSummary> getLatestResultSummaries()
ResultsSummaryManager
getLatestResultSummaries
in interface ResultsSummaryManager
List
of ResultsSummary
public java.util.List<ResultsSummary> getLatestFailedResultSummaries()
ResultsSummaryManager
getLatestFailedResultSummaries
in interface ResultsSummaryManager
List
of ResultsSummary
public long getAverageBuildTime(@NotNull Buildable plan, int numberOfResults)
BuildResultsSummaryManager
getAverageBuildTime
in interface BuildResultsSummaryManager
numberOfResults
- - How many build results to use in the average. must be greater 0 @return Average build time. 0 if no build found.public long getAveragePlanExecutionDuration(@NotNull Plan plan, int numberOfResults)
ResultsSummaryManager
getAveragePlanExecutionDuration
in interface ResultsSummaryManager
numberOfResults
- amount of results to be taken into account for average calculation
public int countResultsWithState(@NotNull PlanKey planKey, int lowerBuildNumber, int upperBuildNumber, @NotNull BuildState buildState)
ResultsSummaryManager
countResultsWithState
in interface ResultsSummaryManager
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 counted
@Nullable public <T extends ResultsSummary> T getLastResultsSummary(@NotNull java.lang.String planKey, java.lang.Class<T> aClass)
ResultsSummaryManager
ResultsSummary
for planKey and Class
getLastResultsSummary
in interface ResultsSummaryManager
public void updateCancelledDetails(@NotNull ResultsSummary resultsSummary)
ResultsSummaryManager
updateCancelledDetails
in interface ResultsSummaryManager
resultsSummary
- results summarypublic void moveResultSummaries(@NotNull Plan newParentPlan, @NotNull PlanKey oldPlanKey, @NotNull PlanKey newPlanKey)
ResultsSummaryManager
moveResultSummaries
in interface ResultsSummaryManager
newParentPlan
- the new parent plan of result summaries. This should be a plan, not a job.public void moveResultSummaries(PlanKey oldPlanKey, PlanKey newPlanKey)
ResultsSummaryManager
moveResultSummaries
in interface ResultsSummaryManager
public long scrollResultSummaries(@NotNull java.lang.String buildKey, @NotNull com.google.common.base.Function<ResultsSummary,java.lang.Void> function)
ResultsSummaryManager
scrollResultSummaries
in interface ResultsSummaryManager
buildKey
- of the plan you want to scroll the result summaries forfunction
- function to be executed on each of the BuildResultSummary
public long scrollResultSummaries(@NotNull java.lang.String buildKey, ResultDataRead resultDataRead, @NotNull com.google.common.base.Function<ResultsSummary,java.lang.Void> function)
ResultsSummaryManager
scrollResultSummaries
in interface ResultsSummaryManager
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
public void logVariablesForSubstitution(@NotNull BuildContext buildContext, @NotNull ResultsSummary resultsSummary)
ResultsSummaryManager
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
logVariablesForSubstitution
in interface ResultsSummaryManager
public void logSubstitutedVariables(@NotNull BuildContext buildContext, @NotNull ResultsSummary resultsSummary)
ResultsSummaryManager
ResultsSummary
This method logs substitution after it was performed and will use only REALLY substituted values
logSubstitutedVariables
in interface ResultsSummaryManager
public void setBuildResultsSummaryDao(BuildResultsSummaryDao buildResultsSummaryDao)
public void setExtendedAuthorManager(ExtendedAuthorManager extendedAuthorManager)
public void setBuildResultsIndexer(BuildResultsIndexer buildResultsIndexer)
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
public void setJiraIssueUtils(JiraIssueUtils jiraIssueUtils)
public void setArtifactLinkManager(ArtifactLinkManager artifactLinkManager)
public void setCommitDao(CommitDao commitDao)
public void setBuildExecutionManager(BuildExecutionManager buildExecutionManager)
public void setRepositoryDefinitionManager(RepositoryDefinitionManager repositoryDefinitionManager)
public void setTestsManager(TestsManager testsManager)
public void setImmutablePlanCacheService(ImmutablePlanCacheService immutablePlanCacheService)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |