Class ExecutorFinishMode
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.operationModes.BaseExecutorMode
-
- jetbrains.buildServer.agent.impl.operationModes.ExecutorFinishMode
-
- All Implemented Interfaces:
AgentOperationMode
,AgentOperationModeEx
public class ExecutorFinishMode extends BaseExecutorMode
An operation mode which helps isolate the execution of allBuildFinishStage
s into a separate container that runs after the lastExecutorRunnerMode
container has finished 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).
- Since:
- 2023.09
- See Also:
BaseExecutorMode
-
-
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
-
-
Constructor Summary
Constructors Constructor Description ExecutorFinishMode(BuildAgentImpl buildAgent, EventDispatcher<AgentLifeCycleListener> dispatcher, BuildCacheHolder buildCacheHolder)
-
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
onBuildFinish(AgentRunningBuild build, BuildFinishedStatus buildStatus)
boolean
onRunnersFinished(AgentRunningBuild build, BuildFinishedStatus buildStatus)
-
Methods inherited from class jetbrains.buildServer.agent.impl.operationModes.BaseExecutorMode
applyBuildStateToAgent, flushAgentLog, isRegistrationOnServerSupported, onAgentStart, 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
-
ExecutorFinishMode
public ExecutorFinishMode(@NotNull BuildAgentImpl buildAgent, EventDispatcher<AgentLifeCycleListener> dispatcher, @NotNull BuildCacheHolder buildCacheHolder)
-
-
Method Detail
-
onRunnersFinished
public boolean onRunnersFinished(@NotNull AgentRunningBuild build, @NotNull BuildFinishedStatus buildStatus)
- Returns:
- true if build can be finished
-
onBuildFinish
public void onBuildFinish(@NotNull AgentRunningBuild build, @NotNull BuildFinishedStatus buildStatus)
-
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
-
-