Package jetbrains.buildServer.serverSide
Interface BuildTypeOrderedBuilds
-
- All Known Implementing Classes:
BuildTypeOrderedBuildsImpl
public interface BuildTypeOrderedBuilds
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
consumeBuilds(Predicate<String> branchPredicate, Consumer<OrderedBuild> consumer)
Traverses builds from branches matched by predicate in no particular order, calls consumer on every build.void
consumeBuildsAfter(SVcsModification modification, BiConsumer<String,OrderedBuild> consumer)
Traverses all builds from all branches starting with anchor modification.OrderedBuild
findBuildById(long promotionId)
Searches for an ordered build by promotion idList<OrderedBuild>
getAllBuilds()
List<OrderedBuild>
getAllBuilds(String branchName)
List<OrderedBuild>
getAllBuildsInBranches(Filter<String> branchFilter)
List<String>
getBranches()
List<OrderedBuild>
getBuildsAfter(SBuild build)
List<OrderedBuild>
getBuildsAfter(SBuild build, Filter<OrderedBuild> buildFilter)
List<OrderedBuild>
getBuildsAfter(SVcsModification m, Filter<OrderedBuild> buildFilter)
List<OrderedBuild>
getBuildsBefore(SBuild build)
List<OrderedBuild>
getBuildsBefore(SBuild build, Filter<OrderedBuild> buildFilter)
List<OrderedBuild>
getBuildsBeforeInBranches(BuildPromotion promotion, Filter<String> branchFilter)
Returns builds before given promotion (ordered by changes)OrderedBuild
getLatestBuild()
boolean
hasBuilds()
void
processBuildsInBranch(String branchName, ItemProcessor<OrderedBuild> processor)
Traverses builds in the specified branch until processor returns falsevoid
processBuildsInBranches(BiProcessor<String,List<OrderedBuild>> processor)
Calls processor for all builds in all branches.
-
-
-
Method Detail
-
getAllBuilds
@NotNull List<OrderedBuild> getAllBuilds(@NotNull String branchName)
- Returns:
- all ordered builds, recent first. The list includes cancelled and does not include personal builds.
-
getAllBuilds
@NotNull List<OrderedBuild> getAllBuilds()
- Returns:
- all ordered builds, recent first.
-
getAllBuildsInBranches
@NotNull List<OrderedBuild> getAllBuildsInBranches(@NotNull Filter<String> branchFilter)
- Returns:
- all ordered builds with the branches matched by the filter, recent builds are first.
-
consumeBuilds
void consumeBuilds(@NotNull Predicate<String> branchPredicate, @NotNull Consumer<OrderedBuild> consumer)
Traverses builds from branches matched by predicate in no particular order, calls consumer on every build.- Parameters:
branchPredicate
- predicate for branch namesconsumer
- consumer to call
-
processBuildsInBranches
void processBuildsInBranches(@NotNull BiProcessor<String,List<OrderedBuild>> processor)
Calls processor for all builds in all branches.- Parameters:
processor
- which accepts a pair of a branch name and a list of builds in this branch, as soon as processor returns false, the processing stops too, the builds are sorted by changes, most recent comes first- Since:
- 2022.02
-
consumeBuildsAfter
void consumeBuildsAfter(@NotNull SVcsModification modification, @NotNull BiConsumer<String,OrderedBuild> consumer)
Traverses all builds from all branches starting with anchor modification.- Parameters:
consumer
- consumer which accepts branch name as the first argument and ordered build as the second one- Since:
- 2019.1.1
-
processBuildsInBranch
void processBuildsInBranch(@NotNull String branchName, @NotNull ItemProcessor<OrderedBuild> processor)
Traverses builds in the specified branch until processor returns false- Parameters:
branchName
-processor
-- Since:
- 2018.2
-
getBuildsAfter
@NotNull List<OrderedBuild> getBuildsAfter(@NotNull SVcsModification m, @NotNull Filter<OrderedBuild> buildFilter)
-
getBuildsAfter
@NotNull List<OrderedBuild> getBuildsAfter(@NotNull SBuild build)
- Parameters:
build
- anchor build- Returns:
- list of ordered builds which ran after the given one (ordered by changes), build with oldest changes first. The list includes cancelled and does not include personal builds.
-
getBuildsAfter
@NotNull List<OrderedBuild> getBuildsAfter(@NotNull SBuild build, @NotNull Filter<OrderedBuild> buildFilter)
- Parameters:
build
- anchor buildbuildFilter
- builds filter- Returns:
- list of ordered builds which ran after the given one (ordered by changes), build with oldest changes first. The list includes all builds matched by provided filter.
-
getBuildsBefore
@NotNull List<OrderedBuild> getBuildsBefore(@NotNull SBuild build, @NotNull Filter<OrderedBuild> buildFilter)
- Parameters:
build
- anchor buildbuildFilter
- builds filter- Returns:
- list of ordered builds which ran before the given one (ordered by changes), recent first. The list includes all builds matched by provided filter.
- Since:
- 2017.1
-
getBuildsBefore
@NotNull List<OrderedBuild> getBuildsBefore(@NotNull SBuild build)
- Parameters:
build
- anchor build- Returns:
- list of ordered builds which ran before the given one (ordered by changes), recent first. The list includes cancelled and does not include personal builds.
-
getBuildsBeforeInBranches
@NotNull List<OrderedBuild> getBuildsBeforeInBranches(@NotNull BuildPromotion promotion, @NotNull Filter<String> branchFilter)
Returns builds before given promotion (ordered by changes)- Parameters:
promotion
- promotion of interestbranchFilter
- branch filter, result will include builds from branches accepted by the filter- Returns:
- see above
-
hasBuilds
boolean hasBuilds()
-
getLatestBuild
@Nullable OrderedBuild getLatestBuild()
-
findBuildById
@Nullable OrderedBuild findBuildById(long promotionId)
Searches for an ordered build by promotion id- Parameters:
promotionId
-- Returns:
- Since:
- 2020.1.2
-
-