@Internal public interface BuildResultsSummaryDao extends BambooObjectDao<ResultsSummary>
Modifier and Type | Field and Description |
---|---|
static int |
NUMBER_OF_DAYS_TO_FILTER |
Modifier and Type | Method and Description |
---|---|
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.
|
int |
countBuildResultsSummaries()
Count all result summaries records.
|
int |
countBuildResultsSummaries(String planKey) |
long |
countResultSummaries(ResultsSummaryCriteria criteria)
Count the number of
ResultsSummary objects given a ResultsSummaryCriteria . |
int |
countResultsWithState(PlanKey planKey,
int lowerBuildNumber,
int upperBuildNumber,
BuildState buildState)
Counts results with a given state in a given build number range for plan.
|
List<Integer> |
findAllBuildResultsNumbers(PlanKey planKey) |
<T extends ResultsSummary> |
findAnyResultSummary(ResultsSummaryCriteria criteria,
ResultDataRead dataRead)
Searches for any
ResultsSummary object given a ResultsSummaryCriteria . |
Range<Integer> |
findBuildResultsNumberRange(PlanKey planKey)
Finds minimum and maximum build number for a plan.
|
List<ResultsSummary> |
findBuildResultsSummariesByJiraIssues(List<String> issueKeys)
Get a list of results summaries associated with the list of issue keys.
|
List<ResultsSummary> |
findBuildResultsSummariesByProjectKey(String jiraProjectKey)
Retrieve a list of results summaries associated with given JIRA project key
This will not return records marked for deletion.
|
List<Pair<ArtifactLink,BuildResultsSummary>> |
findBuildResultsWithArtifacts(String planKey)
Find all build results which have matching artifacts.
|
List<BuildResultsSummary> |
findBuildsForImageConfiguration(String planKey,
ElasticImageConfiguration elasticImageConfiguration,
BuildState buildState,
int maxResults)
Searcher for builds of an image
|
List<PlanResultKey> |
findChainResultsWithFormatVersionLessThan(int formatVersion,
int maxResults)
Deprecated.
internal use only
|
List<ChainResultsSummary> |
findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria,
List<Label> labels)
Searches through all chains to find any that have jobs which match the given labels.
|
Integer |
findFirstBuildNumberAfter(String planKey,
int buildNumber)
Returns the build number of next existing build results.
|
ResultsSummary |
findFirstBuildResultWithBuildStateAfter(String planKey,
int buildNumber,
BuildState buildState)
Finds the last successful
BuildResultsSummary after buildNumber |
ResultsSummary |
findFirstBuildResultWithBuildStateBetween(String planKey,
int lowerBuildNumber,
int upperBuildNumber,
BuildState buildState)
Returns the first build that matches
BuildState between the given build number range
Note that this function is inclusive of the upper and lower bound |
<T extends ResultsSummary> |
findFirstResultAfter(String planKey,
int buildNumber,
Class<T> aClass)
Finds the first successful or failed
BuildResultsSummary after buildNumber |
Integer |
findLastBuildNumberBefore(String planKey,
int buildNumber)
Returns the build number of previous existing build results.
|
<T extends ResultsSummary> |
findLastBuildResultBeforeWithTests(PlanResultKey planResultKey,
Class<T> aClass,
boolean includeOnceOffBuilds) |
ResultsSummary |
findLastBuildResultWithBuildStateBefore(String planKey,
int buildNumber,
BuildState buildState)
Finds the last
BuildResultsSummary before buildNumber with BuildState |
<T extends ResultsSummary> |
findLastResultBefore(String planKey,
int buildNumber,
Class<T> aClass,
boolean includeOnceOffBuilds)
Finds the last successful or failed
ResultsSummary before buildNumber |
<T extends ResultsSummary> |
findLastResultSummaryWithState(PlanKey planKey,
BuildState buildState,
Class<T> aClass) |
List<ResultsSummary> |
findLatestFailedResultSummaries()
Find the failed result summaries for all TopLevelPlans in Bamboo that have occurred
in the last X days, where x is the constant NUMBER_OF_DAYS_TO_FILTER
|
List<ResultsSummary> |
findLatestResultsSummaries()
Find the result summaries for all TopLevelPlans in Bamboo that have occurred
in the last X days, where x is the constant NUMBER_OF_DAYS_TO_FILTER
|
Iterable<PlanKey> |
findPlanKeysFromAllOrphanedResultSummaries()
Scans database for all the
ResultsSummary objects in the database that do not have a matching Plan |
<T extends ResultsSummary> |
findResultsSummaries(ResultsSummaryCriteria criteria)
Searches for
ResultsSummary objects given a ResultsSummaryCriteria . |
<T extends ResultsSummary> |
findResultSummariesForExpiry(ExpiryCriteria criteria)
Searches for
ResultsSummary objects given a ExpiryCriteria . |
List<ResultsSummary> |
getAfterSummaries(ImmutablePlan plan,
int buildNumber,
int maxCount)
Returns build results strictly after given build number.
|
<T extends ResultsSummary> |
getAllActiveResultSummariesForPlan(PlanKey planKey,
Class<T> aClass)
Returns all the
ResultsSummary in a LifeCycleState.PENDING , LifeCycleState.QUEUED , LifeCycleState.IN_PROGRESS state with the given Class
See also LifeCycleState.isActive(LifeCycleState) and ImmutableResultsSummary.isActive() |
<T extends ResultsSummary> |
getAllBuildResultSummariesInBuildState(BuildState state,
Class<T> aClass)
Returns all the
BuildResultsSummary in requested build state. |
<T extends ResultsSummary> |
getAllBuildResultSummariesInLifeCycleState(LifeCycleState state,
Class<T> aClass)
Returns all the
BuildResultsSummary in requested lifecycle state. |
<T extends ResultsSummary> |
getAllBuildResultSummariesInUnknownState(Class<T> aClass)
Returns all the
BuildResultsSummary in a BuildState.UNKNOWN
state
This will not return records marked for deletion. |
Collection<BuildResultsSummary> |
getAllInProgressBuildResultSummaries()
Returns all the
BuildResultsSummary in a LifeCycleState.IN_PROGRESS state
This will not return records marked for deletion. |
<T extends ResultsSummary> |
getAllInProgressResultSummaries(Class<T> aClass)
Returns all the
ResultsSummary in a LifeCycleState.IN_PROGRESS state with the given Class
This will not return records marked for deletion. |
<T extends ResultsSummary> |
getAllPendingResultSummaries(Class<T> aClass)
Returns all the
ResultsSummary in a LifeCycleState.PENDING state with the given Class
This will not return records marked for deletion. |
<T extends ResultsSummary> |
getAllQueuedResultSummaries(Class<T> aClass)
Returns all the
ResultsSummary in a LifeCycleState.QUEUED state with the given Class
This will not return records marked for deletion. |
<T extends ResultsSummary> |
getAllResultSummariesForPlan(Plan plan)
Get all the
ResultsSummary s for the given Plan |
List<ResultsSummary> |
getBeforeSummaries(ImmutablePlan plan,
int buildNumber,
int maxCount)
Returns build results strictly before given build number.
|
ResultsSummary |
getBreakingBuild(ResultsSummary summary) |
ChainStageResult |
getChainStageResultById(long id)
Returns a
ChainStageResult by its id |
<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 . |
BuildResultsSummary |
getFirstBuildSummary(PlanKey planKey)
Returns the first available
BuildResultsSummary for the given PlanKey |
ResultsSummary |
getFixingBuild(ResultsSummary summary)
Returns the first successful
BuildResultsSummary for given BuildResultsSummary . |
List<LinkedJiraIssue> |
getJiraIssuesForBuildResults(List<ResultsSummary> buildResults)
Retrieves a list of
LinkedJiraIssue linked to the given build result summaries |
List<LinkedJiraIssue> |
getJiraIssuesForPlanKey(PlanKey planKey)
Retrieves a list of
LinkedJiraIssue that are linked to the given build. |
<T extends ResultsSummary> |
getLastResultSummary(String planKey,
Class<T> aClass)
Returns the latest completed
ResultsSummary for the plan represented by planKey |
List<ResultsSummary> |
getNeighbouringSummaries(ImmutablePlan plan,
int buildNumber,
int maxCount)
Returns build results "around" given build number.
|
List<ResultsSummary> |
getNeighbouringSummaries(Plan plan,
int currentBuildNumber)
Returns build results "around" given build number
|
int |
getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
Get the number of concurrently running builds for planKey
|
long |
getNumberOfFinalizedResults(ImmutablePlan plan)
Get number of the
ResultsSummary s in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state for the given Plan |
long |
getNumberOfFinishedResults(Plan build)
Returns the number of finished results available for the given
Plan |
ChainResultsSummary |
getParentResultSummary(ResultsSummary summary)
Get (@link ChainResultsSummary} containing given
ResultsSummary |
List<PlanKey> |
getPlanKeysSortedByNumberOfFinalizedResultSummaries() |
<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, all lazy initialized collections can be eagerly read |
Long |
getResultsSummaryId(PlanResultKey planResultKey)
Return
ResultsSummary 's database id. |
<T extends ResultsSummary> |
getResultSummariesByChangeSetId(String changeSetId,
Class<T> discriminator)
Get a list of all build results containing a commit with the given changeset 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 changeset ID that are in the given repository.
|
<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 changeset IDs.
|
<T extends ResultsSummary> |
getResultSummariesByCheckoutChangesetId(String changesetId,
Class<T> discriminator)
Get a list of all build results containing repositories checked out with the given changeset ID.
|
<T extends ResultsSummary> |
getResultSummariesForPlan(ImmutablePlan plan,
int firstResult,
int maxResults)
Get the
ResultsSummary s for the given Plan . |
<T extends ResultsSummary> |
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 |
int |
markResultSummariesForDeletion(PlanKey planKey)
Mass update of all
ResultsSummary records in the database related to a Plan identified by planKey. |
int |
moveResultSummaries(PlanKey oldPlanKey,
PlanKey newPlanKey)
Reassigns plan key ResultsSummaries associated with selected plan key.
|
int |
removeResultsSummariesForPlan(PlanKey planKey)
Remove all resultSummary objects for the given plan.
|
void |
removeResultsSummary(ResultsSummary buildResultsSummary)
Removes the passed result summary
|
long |
scrollResultSummaries(String buildKey,
ResultDataRead resultDataRead,
Consumer<ResultsSummary> consumer)
Scroll through and execute function for each of ResultsSummary (Build and Chain)
Objects passed to function are not fully initialized.
|
long |
scrollVariableSubstitutionForExport(Consumer<VariableSubstitution> consumer)
Scroll through and execute function for each of VariableSubstitution
Objects passed to function are not fully initialized.
|
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
static final int NUMBER_OF_DAYS_TO_FILTER
@NotNull <T extends ResultsSummary> Collection<T> getAllBuildResultSummariesInUnknownState(Class<T> aClass)
BuildResultsSummary
in a BuildState.UNKNOWN
state
This will not return records marked for deletion.@NotNull <T extends ResultsSummary> Collection<T> getAllPendingResultSummaries(Class<T> aClass)
ResultsSummary
in a LifeCycleState.PENDING
state with the given Class
This will not return records marked for deletion.@NotNull <T extends ResultsSummary> Collection<T> getAllQueuedResultSummaries(Class<T> aClass)
ResultsSummary
in a LifeCycleState.QUEUED
state with the given Class
This will not return records marked for deletion.@NotNull <T extends ResultsSummary> Collection<T> getAllInProgressResultSummaries(Class<T> aClass)
ResultsSummary
in a LifeCycleState.IN_PROGRESS
state with the given Class
This will not return records marked for deletion.@NotNull <T extends ResultsSummary> Collection<T> getAllActiveResultSummariesForPlan(PlanKey planKey, Class<T> aClass)
ResultsSummary
in a LifeCycleState.PENDING
, LifeCycleState.QUEUED
, LifeCycleState.IN_PROGRESS
state with the given Class
See also LifeCycleState.isActive(LifeCycleState)
and ImmutableResultsSummary.isActive()
@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
.
Result 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;int getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
planKey
- @Internal @Nullable Long getResultsSummaryId(@NotNull PlanResultKey planResultKey)
ResultsSummary
's database id.
This method is intended for internal use (currently in importer)planResultKey
- plan result key of ResultsSummary
to be foundResultsSummary
or null if not found@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 readT
- planResultKey
- aClass
- dataRead
- @NotNull <T extends ResultsSummary> Collection<T> getAllBuildResultSummariesInBuildState(@NotNull BuildState state, Class<T> aClass)
BuildResultsSummary
in requested build state.
This will not return records marked for deletion.state
- aClass
- @NotNull <T extends ResultsSummary> Collection<T> getAllBuildResultSummariesInLifeCycleState(@NotNull LifeCycleState state, Class<T> aClass)
BuildResultsSummary
in requested lifecycle state.
This will not return records marked for deletion.state
- aClass
- @NotNull Collection<BuildResultsSummary> getAllInProgressBuildResultSummaries()
BuildResultsSummary
in a LifeCycleState.IN_PROGRESS
state
This will not return records marked for deletion.@Nullable BuildResultsSummary getFirstBuildSummary(@NotNull PlanKey planKey)
BuildResultsSummary
for the given PlanKey
planKey
- <T extends ResultsSummary> T getLastResultSummary(String planKey, Class<T> aClass)
ResultsSummary
for the plan represented by planKeyplanKey
- long getNumberOfFinishedResults(Plan build)
Plan
build
- long getNumberOfFinalizedResults(@NotNull ImmutablePlan plan)
ResultsSummary
s in a LifeCycleState.FINISHED
or LifeCycleState.NOT_BUILT
state for the given Plan
plan
- @NotNull List<ResultsSummary> getNeighbouringSummaries(Plan plan, int currentBuildNumber)
plan
- currentBuildNumber
- @NotNull List<ResultsSummary> getNeighbouringSummaries(@NotNull ImmutablePlan plan, int buildNumber, int maxCount)
plan
- the plan to return results forbuildNumber
- the build number to search aroundmaxCount
- the maximum number of builds to returnmaxCount
items in the list, inclusive of
the result for buildNumber
(if present).@NotNull List<ResultsSummary> getBeforeSummaries(@NotNull ImmutablePlan plan, int buildNumber, int maxCount)
plan
- the plan to return results forbuildNumber
- the build number to search beforemaxCount
- the maximum number of builds to returnmaxCount
items in the list,
exclusive of the result for buildNumber
(if present).@NotNull List<ResultsSummary> getAfterSummaries(@NotNull ImmutablePlan plan, int buildNumber, int maxCount)
plan
- the plan to return results forbuildNumber
- the build number to search aftermaxCount
- the maximum number of builds to returnmaxCount
items in the list, exclusive of
the result for buildNumber
(if present).@Nullable ResultsSummary getBreakingBuild(ResultsSummary summary)
@Nullable ResultsSummary getFixingBuild(ResultsSummary summary)
BuildResultsSummary
for given BuildResultsSummary
.
The input build is returned if it is successful.summary
- @NotNull <T extends ResultsSummary> T findAnyResultSummary(@NotNull ResultsSummaryCriteria criteria, ResultDataRead dataRead)
ResultsSummary
object given a ResultsSummaryCriteria
.
Note that if criteria does not specify order then result of this method might be non-deterministic.criteria
- List
of BuildResultsSummary
@NotNull <T extends ResultsSummary> List<T> findResultsSummaries(@NotNull ResultsSummaryCriteria criteria)
ResultsSummary
objects given a ResultsSummaryCriteria
.
Note that if criteria does not specify maxResults property, a hard cap of 10000 results is applied to search operation.criteria
- List
of BuildResultsSummary
@Internal int moveResultSummaries(@NotNull PlanKey oldPlanKey, @NotNull PlanKey newPlanKey)
oldPlanKey
- the plan key to move fromnewPlanKey
- the plan key to move tolong countResultSummaries(@NotNull ResultsSummaryCriteria criteria)
ResultsSummary
objects given a ResultsSummaryCriteria
.criteria
- ResultsSummary
that match the criteria.@NotNull <T extends ResultsSummary> List<T> findResultSummariesForExpiry(@NotNull ExpiryCriteria criteria)
ResultsSummary
objects given a ExpiryCriteria
.T
- type of result objects (determined according to given criteria)criteria
- search constraintsList
of ResultsSummary
int removeResultsSummariesForPlan(@NotNull PlanKey planKey)
ResultsSummary
objects to be deletedplanKey
- identifier of plan to remove results for.ResultsSummary
objectsIterable<PlanKey> findPlanKeysFromAllOrphanedResultSummaries()
ResultsSummary
objects in the database that do not have a matching Plan
PlanKey
s they reference ordered by BRS, CRSint countBuildResultsSummaries(@NotNull String planKey)
int countBuildResultsSummaries()
void removeResultsSummary(@NotNull ResultsSummary buildResultsSummary)
buildResultsSummary
- -@NotNull List<ResultsSummary> findBuildResultsSummariesByJiraIssues(@Nullable List<String> issueKeys)
issueKeys
- @NotNull List<ResultsSummary> findBuildResultsSummariesByProjectKey(@Nullable String jiraProjectKey)
jiraProjectKey
- - JIRA project key (prefix of the jira issues e.g. 'BAM')@NotNull List<LinkedJiraIssue> getJiraIssuesForBuildResults(@NotNull List<ResultsSummary> buildResults)
LinkedJiraIssue
linked to the given build result summariesbuildResults
- List<LinkedJiraIssue> getJiraIssuesForPlanKey(@NotNull PlanKey planKey)
LinkedJiraIssue
that are linked to the given build.planKey
- @NotNull List<BuildResultsSummary> findBuildsForImageConfiguration(String planKey, ElasticImageConfiguration elasticImageConfiguration, @Nullable BuildState buildState, int maxResults)
planKey
- elasticImageConfiguration
- buildState
- maxResults
- @Nullable <T extends ResultsSummary> T findLastBuildResultBeforeWithTests(@NotNull PlanResultKey planResultKey, @NotNull Class<T> aClass, boolean includeOnceOffBuilds)
T
- of resultplanResultKey
- of the resultincludeOnceOffBuilds
- tells whether we also consider 'once-off' builds (the ones with custom revision) or should we skip them in our calculationsaClass
- of@Nullable <T extends ResultsSummary> T findLastResultBefore(@NotNull String planKey, int buildNumber, Class<T> aClass, boolean includeOnceOffBuilds)
ResultsSummary
before buildNumberplanKey
- buildNumber
- includeOnceOffBuilds
- tells whether we also consider 'once-off' builds (the ones with custom revision) or should we skip them in our calculations@Nullable <T extends ResultsSummary> T findFirstResultAfter(@NotNull String planKey, int buildNumber, Class<T> aClass)
BuildResultsSummary
after buildNumberplanKey
- buildNumber
- aClass
- @Nullable ResultsSummary findFirstBuildResultWithBuildStateAfter(@NotNull String planKey, int buildNumber, @NotNull BuildState buildState)
BuildResultsSummary
after buildNumberplanKey
- buildNumber
- buildState
- ResultsSummary findLastBuildResultWithBuildStateBefore(@NotNull String planKey, int buildNumber, @NotNull BuildState buildState)
BuildResultsSummary
before buildNumber with BuildState
planKey
- buildNumber
- buildState
- @Nullable ResultsSummary findFirstBuildResultWithBuildStateBetween(@NotNull String planKey, int lowerBuildNumber, int upperBuildNumber, @NotNull BuildState buildState)
BuildState
between the given build number range
Note that this function is inclusive of the upper and lower boundplanKey
- lowerBuildNumber
- upperBuildNumber
- buildState
- @Nullable Integer findFirstBuildNumberAfter(@NotNull String planKey, int buildNumber)
planKey
- buildNumber
- @Nullable Integer findLastBuildNumberBefore(@NotNull String planKey, int buildNumber)
planKey
- buildNumber
- List<Pair<ArtifactLink,BuildResultsSummary>> findBuildResultsWithArtifacts(String planKey)
planKey
- long scrollResultSummaries(@NotNull String buildKey, @NotNull ResultDataRead resultDataRead, @NotNull Consumer<ResultsSummary> consumer)
buildKey
- of the plan you want to scroll the result summaries forconsumer
- consumer to accept each of the BuildResultSummariesresultDataRead
- if the data should be loaded lazy or eagerly@Nullable ChainStageResult getChainStageResultById(long id)
ChainStageResult
by its id<T extends ResultsSummary> List<T> getAllResultSummariesForPlan(@NotNull Plan plan)
ResultsSummary
s for the given Plan
T
- plan
- @NotNull <T extends ResultsSummary> List<T> getResultSummariesForPlan(@NotNull ImmutablePlan plan, int firstResult, int maxResults)
ResultsSummary
s for the given Plan
. Results are sorted by build number (descending). User can skip
first n result and request maximum number of results. Note: fetching huge amount of data in single call should be avoided.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)
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.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.<T extends ResultsSummary> List<T> getResultSummariesByChangeSetId(@NotNull String changeSetId, @NotNull Class<T> discriminator)
Get a list of all build results containing a commit with the given changeset ID.
Please note that a build result summary contains list of commits which were added in a given build (compared to a previous one). It means that a list of commits may be empty if there were no repository changes. A list of commits is also empty in case of a first build in a plan or a first build of a plan's branch. A build results summary may also contain no commits if no version control system was used.
This will not return records marked for deletion.
In case you need to find build results based on commit which was checked out into a build workspace, see the
getResultSummariesByCheckoutChangesetId(String, Class)
.
changeSetId
- of the commitdiscriminator
- class of the ResultSummary interface required<T extends ResultsSummary> List<T> getResultSummariesByCheckoutChangesetId(@NotNull String changesetId, @NotNull Class<T> discriminator)
Get a list of all build results containing repositories checked out with the given changeset ID.
A build may use one or more repositories, each checked out with a certain changeset. This method returns build results having exact changeset ID checked out (note that it does not search for intermediate commits between two changeset IDs).
This will not return records marked for deletion.
In case you need to find build results based on commits which were added in certain build (compared to a previous
one), see the getResultSummariesByChangeSetId(String, Class)
.
changesetId
- of the commitdiscriminator
- class of the ResultSummary interface requiredchangesetId
commit<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<T extends ResultsSummary> List<T> getResultSummariesByChangeSetIds(@NotNull List<String> changeSetIds, @NotNull Class<T> discriminator)
changeSetIds
- of the commitsdiscriminator
- class of the ResultSummary interface required@Nullable ChainResultsSummary getParentResultSummary(ResultsSummary summary)
ResultsSummary
summary
- @Nullable ChainStageResult getStageForResult(ResultsSummary resultsSummary)
ResultsSummary
resultsSummary
- List<ResultsSummary> findLatestResultsSummaries()
List<ResultsSummary> findLatestFailedResultSummaries()
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@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
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 countedlong scrollVariableSubstitutionForExport(@NotNull Consumer<VariableSubstitution> consumer)
consumer
- consumer to accept each of the VariableSubstitutionint markResultSummariesForDeletion(@NotNull PlanKey planKey)
ResultsSummary
records in the database related to a Plan identified by planKey.planKey
- key of a plan@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
records@NotNull Range<Integer> findBuildResultsNumberRange(PlanKey planKey)
planKey
- @Deprecated @NotNull List<PlanResultKey> findChainResultsWithFormatVersionLessThan(int formatVersion, int maxResults)
Copyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.