Package jetbrains.buildServer.agent.vcs
Class AgentVcsSupport
- java.lang.Object
-
- jetbrains.buildServer.agent.vcs.AgentVcsSupport
-
- All Implemented Interfaces:
AgentExtension
,AgentVcsExtension
,AgentVcsSupportContext
,AgentVcsSupportCore
,TeamCityExtension
public abstract class AgentVcsSupport extends Object implements AgentVcsSupportContext, AgentVcsSupportCore
Default implementation ofAgentVcsSupportContext
. All VcsSupport on agent implementations are strongly recommended to inherit from this class. Inheriting from this class may strongly increase backward compatibility with forthcoming TeamCity releases.- Since:
- 4.5
-
-
Constructor Summary
Constructors Constructor Description AgentVcsSupport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AgentCheckoutAbility
canCheckout(VcsRoot vcsRoot, CheckoutRules checkoutRules, AgentRunningBuild build)
Check whether this Vcs Support can checkout sources from the specified vcs root.boolean
canRun(BuildAgentConfiguration agentConfiguration, TextLogger messageLog)
This method may be called at any time.AgentVcsSupportCore
getCore()
abstract String
getName()
Name of the VCS plugin.abstract UpdatePolicy
getUpdatePolicy()
-
-
-
Method Detail
-
getCore
@NotNull public AgentVcsSupportCore getCore()
- Specified by:
getCore
in interfaceAgentVcsSupportContext
- Returns:
- object that provides basic functionality for VCS support.
-
getUpdatePolicy
@NotNull public abstract UpdatePolicy getUpdatePolicy()
- Specified by:
getUpdatePolicy
in interfaceAgentVcsSupportContext
- Returns:
- vcs update policy. See
UpdatePolicy
for details.
-
getName
@NotNull public abstract String getName()
Description copied from interface:AgentVcsSupportCore
Name of the VCS plugin. Should be the same as jetbrains.buildServer.vcs.VcsSupport#getName- Specified by:
getName
in interfaceAgentVcsSupportCore
- Returns:
- see above
-
canRun
public boolean canRun(@NotNull BuildAgentConfiguration agentConfiguration, @NotNull TextLogger messageLog)
Description copied from interface:AgentVcsSupportCore
This method may be called at any time. It's guaranteed vcs plugin will be disabled if it has returned false from this method. But subsequent calls to canRun are still possible.- Specified by:
canRun
in interfaceAgentVcsSupportCore
- Parameters:
agentConfiguration
- - current agent configurationmessageLog
- - logger to log user-related information on plugin availability- Returns:
- true if the vcs support can run in this particular environment or not. For example, returning 'false' is a way for a runner to refuse to run on a system that is not supported by the runner If 'false' is returned, the Agent won't register the vcs support and it won't be advertised to the build server server during agent's registration
-
canCheckout
@NotNull public AgentCheckoutAbility canCheckout(@NotNull VcsRoot vcsRoot, @NotNull CheckoutRules checkoutRules, @NotNull AgentRunningBuild build)
Description copied from interface:AgentVcsSupportCore
Check whether this Vcs Support can checkout sources from the specified vcs root.- Specified by:
canCheckout
in interfaceAgentVcsSupportCore
-
-