Class AbstractGitExecutor
java.lang.Object
com.atlassian.bamboo.plugins.git.v2.AbstractGitExecutor
- Direct Known Subclasses:
GitBambooSpecsHandler,GitBranchCreator,GitBranchDetector,GitChangeDetector,GitConnectionTester,GitTagCreator,GitTagsHandler,GitVariableGenerator,GitWorkingCopyManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BuildDirectoryManagerprotected final BuildLoggingContextprotected final CustomVariableContextstatic final Stringprotected final com.atlassian.sal.api.message.I18nResolverprotected final SshProxyServiceprotected final TrustedKeyHelper -
Constructor Summary
ConstructorsConstructorDescriptionAbstractGitExecutor(CapabilityContext capabilityContext, CustomVariableContext customVariableContext, BuildDirectoryManager buildDirectoryManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, TrustedKeyHelper trustedKeyHelper, SshProxyService sshProxyService, BuildLoggingContext buildLoggingContext, GitConfigurationProvider gitConfigurationProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfetchCacheWithRetry(@NotNull GitOperationHelper connector, @NotNull File cacheDirectory, @NotNull HashAndSource hashAndSource, @NotNull BuildLogger buildLogger, boolean fetchTagsByDefault, boolean fetchLfsFiles) protected voidfetchWithRetry(@NotNull GitOperationHelper connector, @NotNull File targetPath, @NotNull HashAndSource hashAndSource, @NotNull BuildLogger buildLogger, boolean useShallow) protected GitRepositoryAccessDatagetAccessData(@NotNull VcsRepositoryData vcsRepositoryData) protected FilegetCacheDirectory(@NotNull GitRepositoryAccessData substitutedAccessData) Deprecated.protected PathgetCachePath(@NotNull GitRepositoryAccessData substitutedAccessData) @Nullable String@Nullable Stringprotected GitRepositoryAccessDatagetSubstitutedAccessData(@NotNull VcsRepositoryData vcsRepositoryData) protected GitRepositoryAccessData.BuildergetSubstitutedAccessDataBuilder(@NotNull VcsRepositoryData vcsRepositoryData) @Nullable Fileprotected voidrethrowOrRemoveDirectory(@Nullable Exception originalException, @NotNull GitOperationHelper operationHelper, @NotNull BuildLogger buildLogger, @NotNull File directory, @NotNull String i18nKey) protected StringsubstituteString(@Nullable String stringWithValuesToSubstitute)
-
Field Details
-
DEFAULT_BRANCH
- See Also:
-
sshProxyService
-
customVariableContext
-
buildDirectoryManager
-
i18nResolver
protected final com.atlassian.sal.api.message.I18nResolver i18nResolver -
trustedKeyHelper
-
buildLoggingContext
-
-
Constructor Details
-
AbstractGitExecutor
@Inject public AbstractGitExecutor(CapabilityContext capabilityContext, CustomVariableContext customVariableContext, BuildDirectoryManager buildDirectoryManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, TrustedKeyHelper trustedKeyHelper, SshProxyService sshProxyService, BuildLoggingContext buildLoggingContext, GitConfigurationProvider gitConfigurationProvider)
-
-
Method Details
-
getWorkingDirectory
-
getGitCapability
-
getSshCapability
-
substituteString
-
getAccessData
protected GitRepositoryAccessData getAccessData(@NotNull @NotNull VcsRepositoryData vcsRepositoryData) -
getSubstitutedAccessDataBuilder
protected GitRepositoryAccessData.Builder getSubstitutedAccessDataBuilder(@NotNull @NotNull VcsRepositoryData vcsRepositoryData) -
getSubstitutedAccessData
protected GitRepositoryAccessData getSubstitutedAccessData(@NotNull @NotNull VcsRepositoryData vcsRepositoryData) -
getCacheDirectory
@Deprecated protected File getCacheDirectory(@NotNull @NotNull GitRepositoryAccessData substitutedAccessData) Deprecated.since 6.0 usegetCachePath(GitRepositoryAccessData)instead -
getCachePath
-
fetchCacheWithRetry
protected void fetchCacheWithRetry(@NotNull @NotNull GitOperationHelper connector, @NotNull @NotNull File cacheDirectory, @NotNull @NotNull HashAndSource hashAndSource, @NotNull @NotNull BuildLogger buildLogger, boolean fetchTagsByDefault, boolean fetchLfsFiles) throws Exception - Throws:
Exception
-
fetchWithRetry
protected void fetchWithRetry(@NotNull @NotNull GitOperationHelper connector, @NotNull @NotNull File targetPath, @NotNull @NotNull HashAndSource hashAndSource, @NotNull @NotNull BuildLogger buildLogger, boolean useShallow) throws Exception - Throws:
Exception
-
rethrowOrRemoveDirectory
protected void rethrowOrRemoveDirectory(@Nullable @Nullable Exception originalException, @NotNull @NotNull GitOperationHelper operationHelper, @NotNull @NotNull BuildLogger buildLogger, @NotNull @NotNull File directory, @NotNull @NotNull String i18nKey) throws Exception - Throws:
Exception
-
getCachePath(GitRepositoryAccessData)instead