public class AgentLifeCycleAdapter extends java.lang.Object implements AgentLifeCycleListener
| Constructor and Description |
|---|
AgentLifeCycleAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterAgentConfigurationLoaded(BuildAgent agent)
is called after build agent loaded it's
properties and it is called before
AgentLifeCycleListener.agentInitialized(BuildAgent)
This is a right place to update loaded environment and set agent-wide properties
using BuildAgentConfiguration interface |
void |
afterAtrifactsPublished(AgentRunningBuild runningBuild,
BuildFinishedStatus status)
Called when all artifacts were published to the server
|
void |
agentInitialized(BuildAgent agent)
Called when method
BuildAgent.init(String[]) finished |
void |
agentShutdown()
Called before agent shutdown
|
void |
agentStarted(BuildAgent agent)
Called after the agent
BuildAgent.start() method |
void |
beforeAgentConfigurationLoaded(BuildAgent agent)
is called before build agent loaded it's
properties and it is called before
AgentLifeCycleListener.agentInitialized(BuildAgent)
This is a right place to detect environment and set agent-wide properties
using BuildAgentConfiguration interface |
void |
beforeBuildFinish(AgentRunningBuild build,
BuildFinishedStatus buildStatus)
Called after finishing build but before buildFinished event is sent to the server
Is called after
AgentLifeCycleListener.beforeRunnerStart(AgentRunningBuild) or AgentLifeCycleListener.beforeBuildInterrupted(AgentRunningBuild, BuildInterruptReason) |
void |
beforeBuildFinish(BuildFinishedStatus buildStatus)
Deprecated.
|
void |
beforeBuildInterrupted(AgentRunningBuild runningBuild,
BuildInterruptReason reason)
Called before build is forcibly terminated, can be called several times if more than one attempt to terminate build is performed.
|
void |
beforeRunnerStart(AgentRunningBuild runningBuild)
Deprecated.
|
void |
beforeRunnerStart(BuildRunnerContext runner)
Called when the build preparation phase is done (sources are gotten, patch is applied, etc.)
a runner is about to be launched.
|
void |
buildFinished(AgentRunningBuild build,
BuildFinishedStatus buildStatus)
Called after the buildFinished event is sent to the server
Is called after
AgentLifeCycleListener.beforeBuildFinish(BuildFinishedStatus)
New build may be started while processing this event |
void |
buildFinished(BuildFinishedStatus buildStatus)
Deprecated.
|
void |
buildStarted(AgentRunningBuild runningBuild)
Called after agent receives start build command from the server.
|
void |
checkoutDirectoryRemoved(java.io.File checkoutDir)
Called when a build checkout directory was removed from
build agent 'work' directory.
|
void |
checkoutModeResolved(AgentCheckoutMode agentCheckoutMode)
Called when effective checkout mode is resolved for the build.
|
void |
dependenciesDownloaded(AgentRunningBuild runningBuild)
Called when dependencies for the build have been resolved and downloaded successfully
|
void |
messageLogged(AgentRunningBuild build,
BuildMessage1 buildMessage)
Called when a build message logged
|
void |
messageLogged(BuildMessage1 buildMessage)
Called when a build message logged
See
AgentLifeCycleListener.messageLogged(AgentRunningBuild, jetbrains.buildServer.messages.BuildMessage1) |
void |
personalPatchApplied(AgentRunningBuild runningBuild)
Called when personal patch is applied to checkout directory.
|
void |
personalPatchReverted(AgentRunningBuild runningBuild)
Called when personal patch is reverted
Will not be called if build is not personal
|
void |
pluginsLoaded()
Called after plugin manager has loaded all plugins.
|
void |
preparationFinished(AgentRunningBuild runningBuild)
Called when all preparations for the build are finished (sources checkout, personal patch, artifact dependencies, free disk space requirement, etc),
and build is ready to execute it's steps, if there are any.
|
void |
runnerFinished(BuildRunnerContext runner,
BuildFinishedStatus status)
|
void |
sourcesUpdated(AgentRunningBuild runningBuild)
Called when non personal changes are applied to checkout directory.
|
public void beforeAgentConfigurationLoaded(@NotNull
BuildAgent agent)
AgentLifeCycleListenerAgentLifeCycleListener.agentInitialized(BuildAgent)
This is a right place to detect environment and set agent-wide properties
using BuildAgentConfiguration interfacebeforeAgentConfigurationLoaded in interface AgentLifeCycleListeneragent - agentpublic void afterAgentConfigurationLoaded(@NotNull
BuildAgent agent)
AgentLifeCycleListenerAgentLifeCycleListener.agentInitialized(BuildAgent)
This is a right place to update loaded environment and set agent-wide properties
using BuildAgentConfiguration interfaceafterAgentConfigurationLoaded in interface AgentLifeCycleListeneragent - agentpublic void pluginsLoaded()
AgentLifeCycleListenerpluginsLoaded in interface AgentLifeCycleListenerpublic void agentInitialized(@NotNull
BuildAgent agent)
AgentLifeCycleListenerBuildAgent.init(String[]) finishedagentInitialized in interface AgentLifeCycleListeneragent - build agentpublic void agentStarted(@NotNull
BuildAgent agent)
AgentLifeCycleListenerBuildAgent.start() methodagentStarted in interface AgentLifeCycleListeneragent - build agentpublic void agentShutdown()
AgentLifeCycleListeneragentShutdown in interface AgentLifeCycleListenerpublic void buildStarted(@NotNull
AgentRunningBuild runningBuild)
AgentLifeCycleListenerAgentPropertiesExtension
agent extension. Note, methods from that interface are called before that method.buildStarted in interface AgentLifeCycleListenerrunningBuild - information about running buildpublic void checkoutModeResolved(@NotNull
AgentCheckoutMode agentCheckoutMode)
AgentLifeCycleListenerAgentRunningBuild.getEffectiveCheckoutMode() will return non-null value.checkoutModeResolved in interface AgentLifeCycleListenerpublic void sourcesUpdated(@NotNull
AgentRunningBuild runningBuild)
AgentLifeCycleListenerAgentLifeCycleListener.buildStarted(AgentRunningBuild) called.
Will not be called if checkout mode is set to manual.sourcesUpdated in interface AgentLifeCycleListenerrunningBuild - current running buildpublic void personalPatchApplied(@NotNull
AgentRunningBuild runningBuild)
AgentLifeCycleListenerpersonalPatchApplied in interface AgentLifeCycleListenerrunningBuild - current running buildpublic void preparationFinished(@NotNull
AgentRunningBuild runningBuild)
preparationFinished in interface AgentLifeCycleListenerrunningBuild - currently running buildAgentLifeCycleListener.preparationFinished(AgentRunningBuild)@Deprecated
public void beforeRunnerStart(@NotNull
AgentRunningBuild runningBuild)
AgentLifeCycleListenerAgentLifeCycleListener.buildStarted(AgentRunningBuild)beforeRunnerStart in interface AgentLifeCycleListenerrunningBuild - running buildpublic void beforeRunnerStart(@NotNull
BuildRunnerContext runner)
AgentLifeCycleListenerAgentLifeCycleListener.buildStarted(AgentRunningBuild),
AgentLifeCycleListener.sourcesUpdated(AgentRunningBuild), AgentLifeCycleListener.personalPatchApplied(AgentRunningBuild)beforeRunnerStart in interface AgentLifeCycleListenerrunner - current runner context parameterspublic void runnerFinished(@NotNull
BuildRunnerContext runner,
@NotNull
BuildFinishedStatus status)
AgentLifeCycleListenerAgentLifeCycleListener.beforeRunnerStart(BuildRunnerContext).
This notification is sent when build runner has finished, crashed or was interrupted.runnerFinished in interface AgentLifeCycleListenerrunner - current runner context parametersstatus - status of process runpublic void beforeBuildInterrupted(@NotNull
AgentRunningBuild runningBuild,
@NotNull
BuildInterruptReason reason)
AgentLifeCycleListenerbeforeBuildInterrupted in interface AgentLifeCycleListenerrunningBuild - running buildreason - reason of build interruption@Deprecated
public void beforeBuildFinish(@NotNull
BuildFinishedStatus buildStatus)
AgentLifeCycleListenerAgentLifeCycleListener.beforeRunnerStart(AgentRunningBuild) or AgentLifeCycleListener.beforeBuildInterrupted(AgentRunningBuild, BuildInterruptReason)beforeBuildFinish in interface AgentLifeCycleListenerbuildStatus - status of the buildpublic void beforeBuildFinish(@NotNull
AgentRunningBuild build,
@NotNull
BuildFinishedStatus buildStatus)
AgentLifeCycleListenerAgentLifeCycleListener.beforeRunnerStart(AgentRunningBuild) or AgentLifeCycleListener.beforeBuildInterrupted(AgentRunningBuild, BuildInterruptReason)beforeBuildFinish in interface AgentLifeCycleListenerbuild - buildbuildStatus - status of the buildpublic void personalPatchReverted(@NotNull
AgentRunningBuild runningBuild)
AgentLifeCycleListenerpersonalPatchReverted in interface AgentLifeCycleListenerrunningBuild - current running buildpublic void afterAtrifactsPublished(@NotNull
AgentRunningBuild runningBuild,
@NotNull
BuildFinishedStatus status)
AgentLifeCycleListenerafterAtrifactsPublished in interface AgentLifeCycleListenerrunningBuild - current running buildstatus - build status@Deprecated
public void buildFinished(@NotNull
BuildFinishedStatus buildStatus)
AgentLifeCycleListenerAgentLifeCycleListener.beforeBuildFinish(BuildFinishedStatus)
New build may be started while processing this eventbuildFinished in interface AgentLifeCycleListenerbuildStatus - status of the buildpublic void buildFinished(@NotNull
AgentRunningBuild build,
@NotNull
BuildFinishedStatus buildStatus)
AgentLifeCycleListenerAgentLifeCycleListener.beforeBuildFinish(BuildFinishedStatus)
New build may be started while processing this eventbuildFinished in interface AgentLifeCycleListenerbuild - buildbuildStatus - status of the buildpublic void messageLogged(@NotNull
BuildMessage1 buildMessage)
AgentLifeCycleListenerAgentLifeCycleListener.messageLogged(AgentRunningBuild, jetbrains.buildServer.messages.BuildMessage1)messageLogged in interface AgentLifeCycleListenerbuildMessage - build messagepublic void messageLogged(@NotNull
AgentRunningBuild build,
@NotNull
BuildMessage1 buildMessage)
AgentLifeCycleListenermessageLogged in interface AgentLifeCycleListenerbuild - build that received this messagebuildMessage - build messagepublic void checkoutDirectoryRemoved(@NotNull
java.io.File checkoutDir)
AgentLifeCycleListenercheckoutDirectoryRemoved in interface AgentLifeCycleListenercheckoutDir - path of the directory. This directory may not
exist at the moment of the call.public void dependenciesDownloaded(@NotNull
AgentRunningBuild runningBuild)
dependenciesDownloaded in interface AgentLifeCycleListenerrunningBuild - current running buildAgentLifeCycleListener.dependenciesDownloaded(AgentRunningBuild)