Interface BuildExecutorsManager

    • Method Detail

      • findExecutorById

        @Nullable
        BuildExecutorDescriptor findExecutorById​(@NotNull
                                                 SProject project,
                                                 @NotNull
                                                 String executorId)
        Searches for executor by id starting with specified project. Search is performed in specified projects and all its parents until the first executor with the ID is found.
        Parameters:
        project - project to start with
        executorId - id of the executor
        Returns:
        the first found executor or null
      • getAvailableExecutorsOfType

        @NotNull
        List<BuildExecutorDescriptor> getAvailableExecutorsOfType​(@NotNull
                                                                  SProject project,
                                                                  @NotNull
                                                                  String executorType)
        Returns all executors of specified type available for current project. These include own project executors and all executors from parent projects.
        Parameters:
        project - current project
        executorType - type of the BuildExecutorType
        Returns:
        all found connections in the project hierarchy order: firstly connections from the specified project, then all connections from parent projects.
      • getAvailableExecutors

        @NotNull
        List<BuildExecutorDescriptor> getAvailableExecutors​(@NotNull
                                                            SProject project)
        Returns own project executor and all connections from parent projects.
        Parameters:
        project - current project
        Returns:
        all connections in the project hierarchy order: firstly connections from the specified project, then all connections from parent projects.
      • getOwnAvailableExecutors

        @NotNull
        List<BuildExecutorDescriptor> getOwnAvailableExecutors​(@NotNull
                                                               SProject project)
        Returns own project executors
        Parameters:
        project - current project
        Returns:
        a list of build executor descriptors available for the specified project
      • getOwnAvailableExecutors

        @NotNull
        List<BuildExecutorDescriptor> getOwnAvailableExecutors​(@NotNull
                                                               SProject project,
                                                               boolean includeSubprojects)
        Retrieves a list of available build executors for the specified project.
        Parameters:
        project - current projects
        includeSubprojects - if true, include executors from subprojects
        Returns:
        a list of build executor descriptors available for the specified project
        Since:
        2024.12
      • addExecutor

        @NotNull
        BuildExecutorDescriptor addExecutor​(@NotNull
                                            SProject project,
                                            @NotNull
                                            Map<String,​String> parameters,
                                            @NotNull
                                            BuildExecutorType executorType)
        Adds a new executor to the specified project.
        Parameters:
        project - the project to add the executor to
        executorType - the type of the executor to add
        parameters - the parameters for the executor
        executorType - the type of the executor to add
        Returns:
        the descriptor of the added executor
      • addExecutor

        @NotNull
        BuildExecutorDescriptor addExecutor​(@NotNull
                                            SProject project,
                                            @NotNull
                                            Map<String,​String> parameters,
                                            @NotNull
                                            String executorType)
                                     throws RuntimeException
        Adds a new executor to the specified project.
        Parameters:
        project - the project to add the executor to
        executorType - the type of the executor to add
        parameters - the parameters for the executor
        executorType - the type of the executor to add
        Returns:
        the descriptor of the added executor
        Throws:
        RuntimeException
      • updateExecutor

        boolean updateExecutor​(@NotNull
                               SProject project,
                               @NotNull
                               String executorId,
                               @NotNull
                               String executorType,
                               @NotNull
                               Map<String,​String> parameters)
        Updates the executor with the specified executorId and providerType in the given project with the provided parameters.
        Parameters:
        project - the project containing the executor
        executorId - the id of the executor to update
        executorType - the type of the executor
        parameters - the new parameters for the executor
        Returns:
        true if the executor was successfully updated, false otherwise
      • removeExecutor

        void removeExecutor​(@NotNull
                            SProject project,
                            @NotNull
                            String executorId)
        Removes a build executor with the specified executorId from the given project.
        Parameters:
        project - the project from which to remove the executor
        executorId - the id of the executor to remove
      • findExecutorType

        @Nullable
        BuildExecutorType findExecutorType​(@NotNull
                                           String type)
        Finds the BuildExecutorType with the specified type.
        Parameters:
        type - the type of the BuildExecutorType to find
        Returns:
        the BuildExecutorType with the specified type, or null if not found