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)
AgentLifeCycleListener
AgentLifeCycleListener.agentInitialized(BuildAgent)
This is a right place to detect environment and set agent-wide properties
using BuildAgentConfiguration
interfacebeforeAgentConfigurationLoaded
in interface AgentLifeCycleListener
agent
- agentpublic void afterAgentConfigurationLoaded(@NotNull BuildAgent agent)
AgentLifeCycleListener
AgentLifeCycleListener.agentInitialized(BuildAgent)
This is a right place to update loaded environment and set agent-wide properties
using BuildAgentConfiguration
interfaceafterAgentConfigurationLoaded
in interface AgentLifeCycleListener
agent
- agentpublic void pluginsLoaded()
AgentLifeCycleListener
pluginsLoaded
in interface AgentLifeCycleListener
public void agentInitialized(@NotNull BuildAgent agent)
AgentLifeCycleListener
BuildAgent.init(String[])
finishedagentInitialized
in interface AgentLifeCycleListener
agent
- build agentpublic void agentStarted(@NotNull BuildAgent agent)
AgentLifeCycleListener
BuildAgent.start()
methodagentStarted
in interface AgentLifeCycleListener
agent
- build agentpublic void agentShutdown()
AgentLifeCycleListener
agentShutdown
in interface AgentLifeCycleListener
public void buildStarted(@NotNull AgentRunningBuild runningBuild)
AgentLifeCycleListener
AgentPropertiesExtension
agent extension. Note, methods from that interface are called before that method.buildStarted
in interface AgentLifeCycleListener
runningBuild
- information about running buildpublic void checkoutModeResolved(@NotNull AgentCheckoutMode agentCheckoutMode)
AgentLifeCycleListener
AgentRunningBuild.getEffectiveCheckoutMode()
will return non-null value.checkoutModeResolved
in interface AgentLifeCycleListener
public void sourcesUpdated(@NotNull AgentRunningBuild runningBuild)
AgentLifeCycleListener
AgentLifeCycleListener.buildStarted(AgentRunningBuild)
called.
Will not be called if checkout mode is set to manual.sourcesUpdated
in interface AgentLifeCycleListener
runningBuild
- current running buildpublic void personalPatchApplied(@NotNull AgentRunningBuild runningBuild)
AgentLifeCycleListener
personalPatchApplied
in interface AgentLifeCycleListener
runningBuild
- current running buildpublic void preparationFinished(@NotNull AgentRunningBuild runningBuild)
preparationFinished
in interface AgentLifeCycleListener
runningBuild
- currently running buildAgentLifeCycleListener.preparationFinished(AgentRunningBuild)
@Deprecated public void beforeRunnerStart(@NotNull AgentRunningBuild runningBuild)
AgentLifeCycleListener
AgentLifeCycleListener.buildStarted(AgentRunningBuild)
beforeRunnerStart
in interface AgentLifeCycleListener
runningBuild
- running buildpublic void beforeRunnerStart(@NotNull BuildRunnerContext runner)
AgentLifeCycleListener
AgentLifeCycleListener.buildStarted(AgentRunningBuild)
,
AgentLifeCycleListener.sourcesUpdated(AgentRunningBuild)
, AgentLifeCycleListener.personalPatchApplied(AgentRunningBuild)
beforeRunnerStart
in interface AgentLifeCycleListener
runner
- current runner context parameterspublic void runnerFinished(@NotNull BuildRunnerContext runner, @NotNull BuildFinishedStatus status)
AgentLifeCycleListener
AgentLifeCycleListener.beforeRunnerStart(BuildRunnerContext)
.
This notification is sent when build runner has finished, crashed or was interrupted.runnerFinished
in interface AgentLifeCycleListener
runner
- current runner context parametersstatus
- status of process runpublic void beforeBuildInterrupted(@NotNull AgentRunningBuild runningBuild, @NotNull BuildInterruptReason reason)
AgentLifeCycleListener
beforeBuildInterrupted
in interface AgentLifeCycleListener
runningBuild
- running buildreason
- reason of build interruption@Deprecated public void beforeBuildFinish(@NotNull BuildFinishedStatus buildStatus)
AgentLifeCycleListener
AgentLifeCycleListener.beforeRunnerStart(AgentRunningBuild)
or AgentLifeCycleListener.beforeBuildInterrupted(AgentRunningBuild, BuildInterruptReason)
beforeBuildFinish
in interface AgentLifeCycleListener
buildStatus
- status of the buildpublic void beforeBuildFinish(@NotNull AgentRunningBuild build, @NotNull BuildFinishedStatus buildStatus)
AgentLifeCycleListener
AgentLifeCycleListener.beforeRunnerStart(AgentRunningBuild)
or AgentLifeCycleListener.beforeBuildInterrupted(AgentRunningBuild, BuildInterruptReason)
beforeBuildFinish
in interface AgentLifeCycleListener
build
- buildbuildStatus
- status of the buildpublic void personalPatchReverted(@NotNull AgentRunningBuild runningBuild)
AgentLifeCycleListener
personalPatchReverted
in interface AgentLifeCycleListener
runningBuild
- current running buildpublic void afterAtrifactsPublished(@NotNull AgentRunningBuild runningBuild, @NotNull BuildFinishedStatus status)
AgentLifeCycleListener
afterAtrifactsPublished
in interface AgentLifeCycleListener
runningBuild
- current running buildstatus
- build status@Deprecated public void buildFinished(@NotNull BuildFinishedStatus buildStatus)
AgentLifeCycleListener
AgentLifeCycleListener.beforeBuildFinish(BuildFinishedStatus)
New build may be started while processing this eventbuildFinished
in interface AgentLifeCycleListener
buildStatus
- status of the buildpublic void buildFinished(@NotNull AgentRunningBuild build, @NotNull BuildFinishedStatus buildStatus)
AgentLifeCycleListener
AgentLifeCycleListener.beforeBuildFinish(BuildFinishedStatus)
New build may be started while processing this eventbuildFinished
in interface AgentLifeCycleListener
build
- buildbuildStatus
- status of the buildpublic void messageLogged(@NotNull BuildMessage1 buildMessage)
AgentLifeCycleListener
AgentLifeCycleListener.messageLogged(AgentRunningBuild, jetbrains.buildServer.messages.BuildMessage1)
messageLogged
in interface AgentLifeCycleListener
buildMessage
- build messagepublic void messageLogged(@NotNull AgentRunningBuild build, @NotNull BuildMessage1 buildMessage)
AgentLifeCycleListener
messageLogged
in interface AgentLifeCycleListener
build
- build that received this messagebuildMessage
- build messagepublic void checkoutDirectoryRemoved(@NotNull java.io.File checkoutDir)
AgentLifeCycleListener
checkoutDirectoryRemoved
in interface AgentLifeCycleListener
checkoutDir
- path of the directory. This directory may not
exist at the moment of the call.public void dependenciesDownloaded(@NotNull AgentRunningBuild runningBuild)
dependenciesDownloaded
in interface AgentLifeCycleListener
runningBuild
- current running buildAgentLifeCycleListener.dependenciesDownloaded(AgentRunningBuild)