Package jetbrains.buildServer.serverSide
Interface BuildsManager
-
- All Superinterfaces:
RunningBuildsManager
- All Known Subinterfaces:
SBuildServer
public interface BuildsManager extends RunningBuildsManager
- Since:
- 5.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SBuild
findBuildInstanceByBuildNumber(java.lang.String buildTypeId, java.lang.String buildNumber)
Returns the most recent build (ordered by changes) with the specified build numberSBuild
findBuildInstanceById(long buildId)
Return the build which corresponds to given buildId.java.util.Collection<SBuild>
findBuildInstances(java.util.Collection<java.lang.Long> buildIds)
Returns collection of builds corresponding to the specified builds ids.java.util.List<SBuild>
findBuildInstancesByBuildNumber(java.lang.String buildTypeId, java.lang.String buildNumber)
Returns builds in specified build configuration id having the specified build number.SBuild
findNextBuild(SBuild build, BuildDataFilter filter)
Returns the next non personal build (finished or running) started after the specified build.SBuild
findPreviousBuild(SBuild build)
Finds a non personal build (running or finished) which was started before the specified build and contains same or previous changes than the specified build.SBuild
findPreviousBuild(SBuild build, BuildDataFilter filter)
Same asfindPreviousBuild(jetbrains.buildServer.serverSide.SBuild)
but searches for a previous build among builds accepted by the specified filter.void
processBuilds(BuildQueryOptions options, ItemProcessor<SBuild> processor)
Returns the builds matched by theoptions
specified.-
Methods inherited from interface jetbrains.buildServer.serverSide.RunningBuildsManager
findRunningBuildById, getNumberOfRunningBuilds, getRunningBuildOnAgent, getRunningBuilds, getRunningBuilds, getRunningStatus
-
-
-
-
Method Detail
-
findBuildInstanceById
@Nullable SBuild findBuildInstanceById(long buildId)
Return the build which corresponds to given buildId. Build can be running, or it can be finished.- Parameters:
buildId
- build identifier- Returns:
- the build which corresponds to given buildId
- Throws:
AccessDeniedException
- if the current authority holder doesn't have an access to the build with the givenid
.- See Also:
Build.isFinished()
,findBuildInstanceByBuildNumber(String, String)
-
findPreviousBuild
@Nullable SBuild findPreviousBuild(@NotNull SBuild build)
Finds a non personal build (running or finished) which was started before the specified build and contains same or previous changes than the specified build. The resulting build belongs to the same build configuration.- Parameters:
build
- build to find previous build for- Returns:
- previous build in same build configuration or null if there is no previous build
-
findPreviousBuild
@Nullable SBuild findPreviousBuild(@NotNull SBuild build, @NotNull BuildDataFilter filter)
Same asfindPreviousBuild(jetbrains.buildServer.serverSide.SBuild)
but searches for a previous build among builds accepted by the specified filter. Previous mean containing previous changes or with same changes but started before this one.- Parameters:
build
- build to find previous build forfilter
- build filter- Returns:
- previous build in same build configuration matching the specified filter or null if there is no previous build
-
findNextBuild
@Nullable SBuild findNextBuild(@NotNull SBuild build, @NotNull BuildDataFilter filter)
Returns the next non personal build (finished or running) started after the specified build.- Parameters:
build
- build to find next build forfilter
- build filter- Returns:
- next build in same build configuration, or null
- Since:
- 7.1.1
- See Also:
findPreviousBuild(SBuild, BuildDataFilter)
-
findBuildInstances
java.util.Collection<SBuild> findBuildInstances(java.util.Collection<java.lang.Long> buildIds)
Returns collection of builds corresponding to the specified builds ids. Both running and finished builds can appear in the resulting collection. The collection will contain existing builds only. NOTE: RETURNED COLLECTION WILL NOT MAINTAIN REQUESTED ORDER!- Parameters:
buildIds
- build identifiers to be searched for.- Returns:
- see above
-
findBuildInstanceByBuildNumber
@Nullable SBuild findBuildInstanceByBuildNumber(@NotNull java.lang.String buildTypeId, @NotNull java.lang.String buildNumber)
Returns the most recent build (ordered by changes) with the specified build number- Parameters:
buildTypeId
- build configuration internal idbuildNumber
- build number string- Returns:
- see above
-
findBuildInstancesByBuildNumber
@NotNull java.util.List<SBuild> findBuildInstancesByBuildNumber(@NotNull java.lang.String buildTypeId, @NotNull java.lang.String buildNumber)
Returns builds in specified build configuration id having the specified build number. Builds are ordered by changes, i.e. the most recent build first. The list may contain personal builds too.- Parameters:
buildTypeId
- build configuration internal idbuildNumber
- build number- Returns:
- see above
- Since:
- 5.1.5
-
processBuilds
void processBuilds(@NotNull BuildQueryOptions options, @NotNull ItemProcessor<SBuild> processor)
Returns the builds matched by theoptions
specified.- Parameters:
options
- query optionsprocessor
- builds processor- Since:
- 7.1
-
-