Interface RunningBuildsManager

    • 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 null
        filter - 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 null
        buildType - 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 null
        filter - filter to apply for builds, can be null
        Returns:
        unmodifiable map of running builds per build type