Package jetbrains.buildServer.serverSide
Interface BuildHistoryEx
-
- All Superinterfaces:
BuildHistory
- All Known Implementing Classes:
DBBuildHistory
,FakeBuildHistory
,SecuredBuildHistory
public interface BuildHistoryEx extends BuildHistory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
buildsRemoved(String buildTypeId, BuildTypeRemovedBuilds predicate)
Accepts a build configuration id and a collection of removed finished builds ids.void
clearCache()
void
createEntry(HistoryBuild build, Date finishTime)
void
createEntryForNotStartedBuild(HistoryBuild build, Date finishTime)
HistoryQueryRunner
createHistoryQueryRunner(User user, boolean includePersonalBuildsIfUserNotSpecified, boolean includeCanceled, boolean orderByChanges)
Map<Long,String>
getBuildNumbers(Collection<Long> buildIds)
Returns build numbers of the specified buildsCollection<SBuildType>
getBuildTypesWithTest(SProject project, long testNameId)
Deprecated.since 2020.2, see TestHistoryCollection<SFinishedBuild>
getCachedEntries(Collection<Long> buildIds)
Same asBuildHistory.findEntries(Collection)
but returns only currently cached builds (does not attempt to load anything from database).List<SFinishedBuild>
getEntriesBetween(long from, long to, boolean includeCanceled)
List<SFinishedBuild>
getHistoryByAgentType(AgentType agent, User user, boolean includeCanceled)
Returns the build history filtered by theagent type
.SFinishedBuild
getLastChangesBuild(String buildTypeId)
Returns last finished build with last changes in the specified configuration, excluding personal and canceled builds.long
getLastEntryId(boolean includeCanceled)
SFinishedBuild
getLastSuccessfulChangesBuild(String buildTypeId)
Returns last successfully finished build with last changes in the specified configuration, personal and canceled builds are not consideredint
getNumberOfBuildsInBuildType(SBuildType buildType)
Return the number of all builds for this build configuration, including personal and canceled onesint
getNumberOfPinnedBuildsInBuildType(SBuildType buildType)
Return the number of pinned builds for this build configurationSet<Long>
getPinnedBuildsIds(Collection<Long> buildIds)
Accepts a collection of build ids and returns those which are pinned.List<STestRun>
getTestHistory(long testNameId, String buildTypeId, long userId, String branchName)
Deprecated.since 2020.2, see TestHistoryList<STestRun>
getTestHistory(long testNameId, String buildTypeId, Filter<STestRun> filter)
Deprecated.since 2020.2, see TestHistoryList<STestRun>
getTestHistory(long testNameId, SProject project, long userId, String branchName)
Deprecated.since 2020.2, see TestHistoryList<STestRun>
getTestHistory(long testNameId, SProject project, Filter<STestRun> filter)
Deprecated.since 2020.2, see TestHistoryvoid
removeCachedEntry(long buildId)
Removes a single cached build from builds history cacheboolean
removeEntry(long buildId, String comment)
Removes finished build from the history with specified reason.-
Methods inherited from interface jetbrains.buildServer.serverSide.BuildHistory
findEntries, findEntries, findEntries, findEntry, findEntry, findEntry, getActiveBuildTypes, getEntries, getEntriesBefore, getEntriesSince, getHistoryByAgent, getLastFinishedBuildDateOnAgent, processEntries, processEntries, removeEntry, removeEntry, removeEntry, removeEntry
-
-
-
-
Method Detail
-
getHistoryByAgentType
@NotNull List<SFinishedBuild> getHistoryByAgentType(@NotNull AgentType agent, @Nullable User user, boolean includeCanceled)
Returns the build history filtered by theagent type
.- Parameters:
agent
- the build agent typeuser
- if set the result will contain only builds byuser
includeCanceled
- if set the result will include calceled builds as well- Returns:
- build history
- Since:
- 5.1
-
getLastChangesBuild
@Nullable SFinishedBuild getLastChangesBuild(String buildTypeId)
Returns last finished build with last changes in the specified configuration, excluding personal and canceled builds.- Parameters:
buildTypeId
- specified configuration id.- Returns:
- last finished build in the specified configuration or
null
if there are no finished builds.
-
getLastSuccessfulChangesBuild
@Nullable SFinishedBuild getLastSuccessfulChangesBuild(String buildTypeId)
Returns last successfully finished build with last changes in the specified configuration, personal and canceled builds are not considered- Parameters:
buildTypeId
- specified configuration id.- Returns:
- last successfully finished build in the specified configuration (excluding personal) or
null
if there are no successfully finished builds.
-
createEntry
void createEntry(@NotNull HistoryBuild build, @NotNull Date finishTime)
-
createEntryForNotStartedBuild
void createEntryForNotStartedBuild(@NotNull HistoryBuild build, @NotNull Date finishTime)
-
getLastEntryId
long getLastEntryId(boolean includeCanceled)
-
getEntriesBetween
@NotNull List<SFinishedBuild> getEntriesBetween(long from, long to, boolean includeCanceled)
-
clearCache
void clearCache()
-
removeCachedEntry
void removeCachedEntry(long buildId)
Removes a single cached build from builds history cache- Parameters:
buildId
- build id
-
buildsRemoved
void buildsRemoved(@NotNull String buildTypeId, @NotNull BuildTypeRemovedBuilds predicate)
Accepts a build configuration id and a collection of removed finished builds ids. Cleans internal caches for builds in this collection.
-
createHistoryQueryRunner
@NotNull HistoryQueryRunner createHistoryQueryRunner(@Nullable User user, boolean includePersonalBuildsIfUserNotSpecified, boolean includeCanceled, boolean orderByChanges)
-
getTestHistory
@Deprecated @NotNull List<STestRun> getTestHistory(long testNameId, @NotNull String buildTypeId, long userId, @Nullable String branchName)
Deprecated.since 2020.2, see TestHistoryOrder of the returned TestRuns is recent runs first, according to the starting order of the builds. Multiple test runs in the build are NOT wrapped into MultiRun class, i.e. each test run is returned independently- Parameters:
buildTypeId
- required to set the build configuration for the test historyuserId
- if > 0, includes personal builds of the given userbranchName
- if not null, returns only builds which match given branchName- Returns:
- Test run objects for given test, recent builds go first
- See Also:
TestHistory
-
getTestHistory
@Deprecated @NotNull List<STestRun> getTestHistory(long testNameId, @NotNull SProject project, long userId, @Nullable String branchName)
Deprecated.since 2020.2, see TestHistoryOrder of the returned TestRuns is recent runs first, according to the starting order of the builds. Multiple test runs in the build are NOT wrapped into MultiRun class, i.e. each test run is returned independently- Parameters:
project
- required to set the parent project, all returned test runs will belong to build configurations under this project and its subprojectsuserId
- if > 0, includes personal builds of the given userbranchName
- if not null, returns only builds which match given branchName- Returns:
- Test run objects for given test, recent builds go first
- See Also:
TestHistory
-
getTestHistory
@Deprecated @NotNull List<STestRun> getTestHistory(long testNameId, @NotNull String buildTypeId, Filter<STestRun> filter)
Deprecated.since 2020.2, see TestHistoryOrder of the returned TestRuns is recent runs first, according to the starting order of the builds. Multiple test runs in the build are NOT wrapped into MultiRun class, i.e. each test run is returned independently- Parameters:
buildTypeId
- required to set the build configuration for the test historyfilter
- additional filter for the returned test runs- Returns:
- Test run objects for given test, recent builds go first
- See Also:
TestHistory
-
getTestHistory
@Deprecated @NotNull List<STestRun> getTestHistory(long testNameId, @NotNull SProject project, Filter<STestRun> filter)
Deprecated.since 2020.2, see TestHistoryOrder of the returned TestRuns is recent runs first, according to the starting order of the builds. Multiple test runs in the build are NOT wrapped into MultiRun class, i.e. each test run is returned independently- Parameters:
project
- required to set the parent project, all returned test runs will belong to build configurations under this project and its subprojectsfilter
- additional filter for the returned test runs- Returns:
- Test run objects for given test, recent builds go first
- See Also:
TestHistory
-
getBuildTypesWithTest
@Deprecated @NotNull Collection<SBuildType> getBuildTypesWithTest(@NotNull SProject project, long testNameId)
Deprecated.since 2020.2, see TestHistory- See Also:
TestHistory
-
removeEntry
boolean removeEntry(long buildId, @Nullable String comment)
Removes finished build from the history with specified reason.- Parameters:
buildId
- build identifier of the finished build.comment
- reason for audit why build is removed- Returns:
- true if the build was successfully removed
-
getCachedEntries
@NotNull Collection<SFinishedBuild> getCachedEntries(@NotNull Collection<Long> buildIds)
Same asBuildHistory.findEntries(Collection)
but returns only currently cached builds (does not attempt to load anything from database).- Parameters:
buildIds
- id list to find builds with these ids.- Since:
- 2019.1
-
getNumberOfBuildsInBuildType
int getNumberOfBuildsInBuildType(@NotNull SBuildType buildType)
Return the number of all builds for this build configuration, including personal and canceled ones- Since:
- 2020.2
-
getNumberOfPinnedBuildsInBuildType
int getNumberOfPinnedBuildsInBuildType(@NotNull SBuildType buildType)
Return the number of pinned builds for this build configuration- Since:
- 2020.2
-
getPinnedBuildsIds
@NotNull Set<Long> getPinnedBuildsIds(@NotNull Collection<Long> buildIds)
Accepts a collection of build ids and returns those which are pinned.- Parameters:
buildIds
-- Returns:
- Since:
- 2023.11
-
getBuildNumbers
@NotNull Map<Long,String> getBuildNumbers(@NotNull Collection<Long> buildIds)
Returns build numbers of the specified builds- Parameters:
buildIds
-- Returns:
- Since:
- 2023.11
-
-