Class ExecutorStartMode

  • All Implemented Interfaces:
    AgentOperationMode, AgentOperationModeEx

    public class ExecutorStartMode
    extends BaseExecutorMode
    Without registering on the server, the agent will execute all the stages that preceed the execution of individual build steps After the completion of the execution of these stages the agent will exit.
    • Constructor Detail

      • ExecutorStartMode

        public ExecutorStartMode​(@NotNull
                                 BuildAgentImpl buildAgent,
                                 @NotNull
                                 AgentBuildFetcher agentBuildFetcher,
                                 @NotNull
                                 BuildCacheHolder buildCacheHolder)
        An operation mode which helps isolate the execution of all BuildStages that precede the execution of the actual build steps into a separate container. This start container runs before the first ExecutorRunnerMode container has started running during an Executor Mode build.

        When the agent is started in Executor Mode, it never registers on the server. Instead, it receives build parameters via command line arguments and is started via an external orchestrator (e.g. Kubernetes). Upon exiting, the agent stores the current build state which is consequently used by the first ExecutorRunnerMode runner.

        Since:
        2023.09
        See Also:
        BaseExecutorMode
    • Method Detail

      • executeRunnerStages

        public BuildFinishedStatus executeRunnerStages​(@NotNull
                                                       AgentRunningBuildEx build,
                                                       @NotNull
                                                       List<BuildStage> buildStages,
                                                       @NotNull
                                                       AgentOperationModeEx.StagesProcessor stagesProcessor)
        Description copied from interface: AgentOperationModeEx
        Executes any miscellaneous steps that need to be conducted by the calling operation mode before its BuildStages are executed (if such exist), iterates through passed buildStages to select those to be executed by the operation mode, and executes them. For traditional (i.e., non-agentless) builds, the function executes all stages.
        Parameters:
        build - current build
        buildStages - all stages to be executed in a build
        stagesProcessor - functional interface which executes the stages passed to it as argument
        Returns:
        cached BuildFinishedStatus for ExecutorFinishMode; status after executing stages for other modes