Class ExecutorStartMode
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.operationModes.BaseExecutorMode
-
- jetbrains.buildServer.agent.impl.operationModes.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.agent.AgentOperationModeEx
AgentOperationModeEx.StagesProcessor
-
-
Field Summary
-
Fields inherited from class jetbrains.buildServer.agent.impl.operationModes.BaseExecutorMode
LOG, myAgentBuild, myAgentBuildSerializer, myBuildAgent, myBuildStateCacheManager
-
-
Constructor Summary
Constructors Constructor Description ExecutorStartMode(BuildAgentImpl buildAgent, AgentBuildFetcher agentBuildFetcher, BuildCacheHolder buildCacheHolder)
An operation mode which helps isolate the execution of allBuildStage
s that precede the execution of the actual build steps into a separate container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BuildFinishedStatus
executeRunnerStages(AgentRunningBuildEx build, List<BuildStage> buildStages, AgentOperationModeEx.StagesProcessor stagesProcessor)
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.void
onAgentStart()
void
onBuildFinish(AgentRunningBuild build, BuildFinishedStatus buildStatus)
boolean
onRunnersFinished(AgentRunningBuild build, BuildFinishedStatus buildStatus)
-
Methods inherited from class jetbrains.buildServer.agent.impl.operationModes.BaseExecutorMode
applyBuildStateToAgent, flushAgentLog, isRegistrationOnServerSupported, restorePasswords, setAgentBuild, shouldCleanTempDirectories, shutdownAgent, shutdownAgentWithError, storeStepData, storeStepData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.agent.AgentOperationModeEx
beforeAgentStart
-
-
-
-
Constructor Detail
-
ExecutorStartMode
public ExecutorStartMode(@NotNull BuildAgentImpl buildAgent, @NotNull AgentBuildFetcher agentBuildFetcher, @NotNull BuildCacheHolder buildCacheHolder)
An operation mode which helps isolate the execution of allBuildStage
s that precede the execution of the actual build steps into a separate container. This start container runs before the firstExecutorRunnerMode
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
-
onAgentStart
public void onAgentStart()
- Specified by:
onAgentStart
in interfaceAgentOperationModeEx
- Overrides:
onAgentStart
in classBaseExecutorMode
-
onBuildFinish
public void onBuildFinish(@NotNull AgentRunningBuild build, @NotNull BuildFinishedStatus buildStatus)
-
onRunnersFinished
public boolean onRunnersFinished(@NotNull AgentRunningBuild build, @NotNull BuildFinishedStatus buildStatus)
- Returns:
- true if build can be finished
-
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 buildbuildStages
- all stages to be executed in a buildstagesProcessor
- functional interface which executes the stages passed to it as argument- Returns:
- cached BuildFinishedStatus for ExecutorFinishMode; status after executing stages for other modes
-
-