Package jetbrains.buildServer.serverSide
Interface RunningBuildsManager
-
- All Known Subinterfaces:
BuildServerEx
,BuildsManager
,RunningBuildsManagerEx
,SBuildServer
- All Known Implementing Classes:
BaseServerTestCase.TestBuildServerImpl
,BuildServerImpl
,BuildsManagerImpl
,RunningBuildsManagerImpl
public interface RunningBuildsManager
Provides various information about currently running builds.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SRunningBuild
findRunningBuildById(long buildId)
Searches for a running build by specified build id.int
getNumberOfRunningBuilds()
Returns total number of currently running builds.SRunningBuild
getRunningBuildOnAgent(SBuildAgent agent)
Returns running build running on the specified agent or null if there are no build on the agent.List<SRunningBuild>
getRunningBuilds()
Same as getRunningBuilds(null, null) List of running builds is sorted by build id in reverse order (most recent build first).List<SRunningBuild>
getRunningBuilds(User user, BuildDataFilter filter)
Returns all running builds including personal builds according to settings of the specified user.List<SRunningBuild>
getRunningBuilds(User user, SBuildType buildType)
Returns all running builds including personal builds which belong to the specified build configuration.Map<SBuildType,List<SRunningBuild>>
getRunningStatus(User user, BuildDataFilter filter)
Returns map of running builds per build configuration.
-
-
-
Method Detail
-
findRunningBuildById
@Nullable SRunningBuild findRunningBuildById(long buildId)
Searches for a running build by specified build id.- Parameters:
buildId
- id of the build- Returns:
- running build with specified build id or null if there are no running build with such build id.
-
getRunningBuildOnAgent
@Nullable SRunningBuild getRunningBuildOnAgent(SBuildAgent agent)
Returns running build running on the specified agent or null if there are no build on the agent.- Parameters:
agent
- agent to search build- Returns:
- running build or null
-
getRunningBuilds
@NotNull List<SRunningBuild> getRunningBuilds(@Nullable User user, @Nullable BuildDataFilter filter)
Returns all running builds including personal builds according to settings of the specified user. If user is not null then all non-personal builds and personal builds of this user will be returned. If user settings are configured to show all personal builds, then personal builds of other users will be returned as well. If user is null, then all personal and non-personal builds are returned. If filter is not null it will be applied to the result. List of running builds is sorted by build id in reverse order (most recent build first).- Parameters:
user
- owner of personal builds, can be nullfilter
- filter to apply for builds, can be null- Returns:
- unmodifiable list of running builds
-
getRunningBuilds
@NotNull List<SRunningBuild> getRunningBuilds(@Nullable User user, @NotNull SBuildType buildType)
Returns all running builds including personal builds which belong to the specified build configuration. If user is not null then all non-personal builds and personal builds of this user will be returned. If user settings are configured to show all personal builds, then personal builds of other users will be returned as well. If user is null, then all personal and non-personal builds are returned. List of running builds is sorted by build id in reverse order (most recent build first).- Parameters:
user
- owner of personal builds or nullbuildType
- build configuration- Returns:
- see above
- Since:
- 2024.12
-
getRunningBuilds
@NotNull List<SRunningBuild> getRunningBuilds()
Same as getRunningBuilds(null, null) List of running builds is sorted by build id in reverse order (most recent build first).- Returns:
- see above
-
getNumberOfRunningBuilds
int getNumberOfRunningBuilds()
Returns total number of currently running builds.- Returns:
- number of currently running builds.
-
getRunningStatus
Map<SBuildType,List<SRunningBuild>> getRunningStatus(@Nullable User user, @Nullable BuildDataFilter filter)
Returns map of running builds per build configuration. Method returns all personal builds if user is null, otherwise only personal builds of this user are returned. If filter is not null it will be applied to the result. The resulting map will contain only those build configurations for which list or running builds is not empty. List of running builds is sorted by build id in reverse order (most recent build first).- Parameters:
user
- owner of personal builds, can be nullfilter
- filter to apply for builds, can be null- Returns:
- unmodifiable map of running builds per build type
-
-