Interface BuildTypeOrderedBuilds

    • 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 names
        consumer - 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
                                          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 build
        buildFilter - 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 build
        buildFilter - 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 interest
        branchFilter - branch filter, result will include builds from branches accepted by the filter
        Returns:
        see above
      • hasBuilds

        boolean hasBuilds()
      • getBranches

        @NotNull
        List<String> getBranches()
        Returns:
        names of branches with at least one build
      • findBuildById

        @Nullable
        OrderedBuild findBuildById​(long promotionId)
        Searches for an ordered build by promotion id
        Parameters:
        promotionId -
        Returns:
        Since:
        2020.1.2