Class GitConnectionTester
java.lang.Object
com.atlassian.bamboo.plugins.git.v2.AbstractGitExecutor
com.atlassian.bamboo.plugins.git.v2.GitConnectionTester
- All Implemented Interfaces:
VcsConnectionTester
-
Field Summary
Fields inherited from class com.atlassian.bamboo.plugins.git.v2.AbstractGitExecutor
buildDirectoryManager, buildLoggingContext, customVariableContext, DEFAULT_BRANCH, i18nResolver, sshProxyService, trustedKeyHelper
Fields inherited from interface com.atlassian.bamboo.vcs.runtime.VcsConnectionTester
HOST_KEY
-
Constructor Summary
ConstructorDescriptionGitConnectionTester
(CapabilityContext capabilityContext, CredentialsAccessor credentialsAccessor, CustomVariableContext customVariableContext, BuildDirectoryManager buildDirectoryManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, TrustedKeyHelper trustedKeyHelper, SshProxyService sshProxyService, BuildLoggingContext buildLoggingContext, com.atlassian.plugins.whitelist.OutboundWhitelist outboundWhitelist) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
handleHostKeyVerificationException
(@NotNull ErrorCollection errorCollection, @NotNull HostKeyVerificationException exception) @NotNull ErrorCollection
testConnection
(@NotNull VcsRepositoryData repositoryData, long timeout, @NotNull TimeUnit unit) Test connection to the repository within the given timeout.Methods inherited from class com.atlassian.bamboo.plugins.git.v2.AbstractGitExecutor
fetchCacheWithRetry, fetchWithRetry, getAccessData, getCacheDirectory, getCachePath, getGitCapability, getSharedCredentialsIdField, getSshCapability, getSubstitutedAccessData, getSubstitutedAccessDataBuilder, getWorkingDirectory, isUsingSharedCredentials, rethrowOrRemoveDirectory, substituteString
-
Constructor Details
-
GitConnectionTester
@Inject public GitConnectionTester(CapabilityContext capabilityContext, CredentialsAccessor credentialsAccessor, CustomVariableContext customVariableContext, BuildDirectoryManager buildDirectoryManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, TrustedKeyHelper trustedKeyHelper, SshProxyService sshProxyService, BuildLoggingContext buildLoggingContext, com.atlassian.plugins.whitelist.OutboundWhitelist outboundWhitelist)
-
-
Method Details
-
testConnection
@NotNull public @NotNull ErrorCollection testConnection(@NotNull @NotNull VcsRepositoryData repositoryData, long timeout, @NotNull @NotNull TimeUnit unit) Description copied from interface:VcsConnectionTester
Test connection to the repository within the given timeout. The method should stop executing after the given time elapses.- Specified by:
testConnection
in interfaceVcsConnectionTester
- Parameters:
repositoryData
- configuration to be testedtimeout
- the maximum time to waitunit
- the time unit of the timeout argument- Returns:
- Errors discovered during testing connection. Empty error collection should be returned if connection was successful. The errors should be translated to error messages, rather than field errors.
-
handleHostKeyVerificationException
protected void handleHostKeyVerificationException(@NotNull @NotNull ErrorCollection errorCollection, @NotNull @NotNull HostKeyVerificationException exception)
-