Package jetbrains.buildServer.agent
Interface BuildAgent
-
- All Superinterfaces:
Agent,AgentLogListener
- All Known Subinterfaces:
BuildAgentEx
- All Known Implementing Classes:
BuildAgentImpl
public interface BuildAgent extends Agent
- Author:
- Kir
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.agentServer.Agent
AGENT_PLUGIN_NAME_FILTER, AGENT_PLUGIN_NAMES_FILTER, AGENT_PLUGIN_PART_NAME, AGENT_PLUGINS_DIR, AGENT_UPDATE_CONTENTS_PATH, AGENT_UPDATE_CONTENTS_PATH_NEW, AGENT_UPDATE_CONTENTS_XML, BUILD_AGENT, DISTRIBUTION_ARCH_NAME, FULL_AGENT_FILE_NAME, UPDATE_PATH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidensureIdle()Blocks until currently running build finishes and all build messages are sent to the serverStringgetBuildId()Current build idBuildAgentConfigurationgetConfiguration()Returns agent configurationIntegergetId()Agent id.Collection<AgentBuildRunner>getRunners()Returns array of registered runnersServergetServerProxy()XmlRpcHandlerManagergetXmlRpcHandlerManager()Deprecated.since 9.1 useServerCommandsHandlersRegistry.voidinit(String[] args)Deprecated.should not be called from plugin codebooleanisRunning()Agent is running buildbooleanregisterOnBuildServer(String buildId)Register on serverAgentBuildResultrunBuild(AgentBuild agentBuild)Starts a build on agentbooleanshutdown()immediate shutdown, running build will be terminatedbooleanshutdownWaitForBuild()shutdown after build has finishedvoidstart()starts agentvoidunregisterFromBuildServer()Disconnect build agent from server-
Methods inherited from interface jetbrains.buildServer.agentServer.Agent
ping2, runBuild, stopBuild, upgrade
-
Methods inherited from interface jetbrains.buildServer.agentServer.AgentLogListener
buildDetachedFromAgent, buildFinished, buildInterrupted, buildInterrupted, isBuildFailing, log
-
-
-
-
Method Detail
-
start
void start()
starts agent
-
shutdown
boolean shutdown()
immediate shutdown, running build will be terminated- Returns:
- true
-
shutdownWaitForBuild
boolean shutdownWaitForBuild()
shutdown after build has finished- Returns:
- true
-
getId
Integer getId()
Agent id.- Returns:
- Agent id
-
getBuildId
@Nullable String getBuildId()
Current build id- Returns:
- Current build id
-
ensureIdle
void ensureIdle()
Blocks until currently running build finishes and all build messages are sent to the server
-
init
@Deprecated void init(String[] args)
Deprecated.should not be called from plugin code
-
getRunners
Collection<AgentBuildRunner> getRunners()
Returns array of registered runners- Returns:
- array of registered runners
-
getServerProxy
@Nullable Server getServerProxy()
- Returns:
- remote server proxy
-
getConfiguration
BuildAgentConfiguration getConfiguration()
Returns agent configuration- Returns:
- agent configuration
-
registerOnBuildServer
boolean registerOnBuildServer(String buildId)
Register on server- Parameters:
buildId- running build id- Returns:
- success flag
-
unregisterFromBuildServer
void unregisterFromBuildServer()
Disconnect build agent from server
-
isRunning
boolean isRunning()
Agent is running build- Returns:
- running flag
-
getXmlRpcHandlerManager
@Deprecated XmlRpcHandlerManager getXmlRpcHandlerManager()
Deprecated.since 9.1 useServerCommandsHandlersRegistry. Handlers registered using this method will be available only by XML RPC.XML-RPC handler manager to manage XML-RPC handlers- Returns:
- XML-RPC handler manager to register/unregister handlers
-
runBuild
@NotNull AgentBuildResult runBuild(@NotNull AgentBuild agentBuild)
Starts a build on agent
-
-