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 AgentCheckoutAbilitycanCheckout(VcsRoot vcsRoot, CheckoutRules checkoutRules, AgentRunningBuild build)Check whether this Vcs Support can checkout sources from the specified vcs root.booleancanRun(BuildAgentConfiguration agentConfiguration, TextLogger messageLog)This method may be called at any time.AgentVcsSupportCoregetCore()abstract StringgetName()Name of the VCS plugin.abstract UpdatePolicygetUpdatePolicy()
-
-
-
Method Detail
-
getCore
@NotNull public AgentVcsSupportCore getCore()
- Specified by:
getCorein interfaceAgentVcsSupportContext- Returns:
- object that provides basic functionality for VCS support.
-
getUpdatePolicy
@NotNull public abstract UpdatePolicy getUpdatePolicy()
- Specified by:
getUpdatePolicyin interfaceAgentVcsSupportContext- Returns:
- vcs update policy. See
UpdatePolicyfor details.
-
getName
@NotNull public abstract String getName()
Description copied from interface:AgentVcsSupportCoreName of the VCS plugin. Should be the same as jetbrains.buildServer.vcs.VcsSupport#getName- Specified by:
getNamein interfaceAgentVcsSupportCore- Returns:
- see above
-
canRun
public boolean canRun(@NotNull BuildAgentConfiguration agentConfiguration, @NotNull TextLogger messageLog)Description copied from interface:AgentVcsSupportCoreThis 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:
canRunin 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:AgentVcsSupportCoreCheck whether this Vcs Support can checkout sources from the specified vcs root.- Specified by:
canCheckoutin interfaceAgentVcsSupportCore
-
-