|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface BuildAgentManager
Provides an ability to operate TeamCity agents.
| Nested Class Summary | |
|---|---|
static class |
BuildAgentManager.RunConfigurationPolicy
Policies to check if the is allowed to run the configuration. |
| Method Summary | ||
|---|---|---|
|
findAgentById(int agentId,
boolean searchUnregistered)
Searches for an agent with specified id among registered and unregistered agents. |
|
|
findAgentByName(java.lang.String agentName,
boolean searchUnregistered)
Searches for an agent with specified name among registered and unregistered agents. |
|
|
getAgentCompatibilities(T agent)
Returns build configuration compatibility information for the specified agent |
|
|
getCanRunConfigurations(T agent)
Returns list of build configurations this agent can potentially run. |
|
|
getNumberOfCompatibleConfigurations(T agent)
Returns number of configurations compatible with specified agent |
|
|
getNumberOfIncompatibleConfigurations(T agent)
Returns number of configurations incompatible with specified agent |
|
|
getRegisteredAgents()
Returns all registered authorized agents. |
|
|
getRegisteredAgents(boolean includeUnauthorized)
Returns all registered agents. |
|
|
getRunConfigurationPolicy(T agent)
Returns run confgiration policy for an agent. |
|
|
getUnregisteredAgents()
Returns list of all currently unregistered agents, i.e. |
|
|
isCanRunConfiguration(T agent,
java.lang.String buildTypeId)
Returns true if specified agent can run specified build configuration. |
|
void |
removeAgent(SBuildAgent agent,
SUser user)
Removes specified agent and cleans up this agent state from the database. |
|
|
setCanRunConfiguration(T agent,
java.lang.String buildTypeId,
boolean canRun)
If BuildAgentManager.RunConfigurationPolicy.SELECTED_COMPATIBLE_CONFIGURATIONS policy is selected for the agent,
sets whether configuration with specified id can or can't run on the agent. |
|
|
setCanRunConfigurations(T agent,
java.lang.String[] buildTypeIds,
boolean canRun)
If BuildAgentManager.RunConfigurationPolicy.SELECTED_COMPATIBLE_CONFIGURATIONS policy is selected for the agent,
sets whether configurations with specified ids can or can't run on the agent. |
|
|
setRunConfigurationPolicy(T agent,
BuildAgentManager.RunConfigurationPolicy policy)
Sets build configuration run policy for an agent. |
|
| Method Detail |
|---|
<T extends SBuildAgent> java.util.List<T> getRegisteredAgents()
<T extends SBuildAgent> java.util.List<T> getRegisteredAgents(boolean includeUnauthorized)
includeUnauthorized - if true, unauthorized agents, i.e. agents which cannot run builds until authorized by admin
<T extends SBuildAgent> java.util.List<T> getUnregisteredAgents()
@Nullable
<T extends SBuildAgent> T findAgentById(int agentId,
boolean searchUnregistered)
agentId - id of the agent to searchsearchUnregistered - true if unregistered agents should be searched too
@Nullable
<T extends SBuildAgent> T findAgentByName(java.lang.String agentName,
boolean searchUnregistered)
agentName - name of the agent to searchsearchUnregistered - true if unregistered agents should be searched too
void removeAgent(@NotNull
SBuildAgent agent,
@Nullable
SUser user)
throws AgentCannotBeRemovedException
agent - agentuser - user who removes agent (can be null)
AgentCannotBeRemovedException - if agent is connected/registered
<T extends SBuildAgent> void setRunConfigurationPolicy(T agent,
BuildAgentManager.RunConfigurationPolicy policy)
BuildAgentManager.RunConfigurationPolicy.ALL_COMPATIBLE_CONFIGURATIONS - all compatible configurations can run on this agent
BuildAgentManager.RunConfigurationPolicy.SELECTED_COMPATIBLE_CONFIGURATIONS - only selected configurations can run on this agent (configuration needs to be compatible too)
agent - the agentpolicy - policy to set<T extends SBuildAgent> BuildAgentManager.RunConfigurationPolicy getRunConfigurationPolicy(T agent)
agent - the agent
<T extends SBuildAgent> void setCanRunConfiguration(T agent,
java.lang.String buildTypeId,
boolean canRun)
BuildAgentManager.RunConfigurationPolicy.SELECTED_COMPATIBLE_CONFIGURATIONS policy is selected for the agent,
sets whether configuration with specified id can or can't run on the agent.
agent - the agentbuildTypeId - id of the configurationcanRun - if true then this configuration can run on the agent, if false it can't
<T extends SBuildAgent> void setCanRunConfigurations(T agent,
java.lang.String[] buildTypeIds,
boolean canRun)
BuildAgentManager.RunConfigurationPolicy.SELECTED_COMPATIBLE_CONFIGURATIONS policy is selected for the agent,
sets whether configurations with specified ids can or can't run on the agent.
agent - the agentbuildTypeIds - ids of the configurationscanRun - if true then these configurations can run on the agent, if false it can't
<T extends SBuildAgent> boolean isCanRunConfiguration(T agent,
java.lang.String buildTypeId)
agent - the agentbuildTypeId - build configuration id
BuildAgentManager.RunConfigurationPolicy.ALL_COMPATIBLE_CONFIGURATIONS policy selected or
configuration was explicitly marked as accessible by the agent. Please note that compatibility check is not performed.<T extends SBuildAgent> java.util.Set<java.lang.String> getCanRunConfigurations(T agent)
agent - the agent
<T extends SBuildAgent> int getNumberOfCompatibleConfigurations(T agent)
agent - agent
<T extends SBuildAgent> int getNumberOfIncompatibleConfigurations(T agent)
agent - agent
<T extends SBuildAgent> java.util.List<AgentCompatibility> getAgentCompatibilities(T agent)
agent - agent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||