Interface BuildsManager

    • 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 given id.
        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 as findPreviousBuild(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 for
        filter - 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 for
        filter - 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 id
        buildNumber - 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 id
        buildNumber - build number
        Returns:
        see above
        Since:
        5.1.5
      • processBuilds

        void processBuilds​(@NotNull
                           BuildQueryOptions options,
                           @NotNull
                           ItemProcessor<SBuild> processor)
        Returns the builds matched by the options specified.
        Parameters:
        options - query options
        processor - builds processor
        Since:
        7.1