public abstract class AbstractGitExecutor extends Object
Modifier and Type | Field and Description |
---|---|
protected BuildDirectoryManager |
buildDirectoryManager |
protected BuildLoggingContext |
buildLoggingContext |
protected CustomVariableContext |
customVariableContext |
static String |
DEFAULT_BRANCH |
protected com.atlassian.sal.api.message.I18nResolver |
i18nResolver |
protected SshProxyService |
sshProxyService |
protected TrustedKeyHelper |
trustedKeyHelper |
Constructor and Description |
---|
AbstractGitExecutor(CapabilityContext capabilityContext,
CredentialsAccessor credentialsAccessor,
CustomVariableContext customVariableContext,
BuildDirectoryManager buildDirectoryManager,
com.atlassian.sal.api.message.I18nResolver i18nResolver,
TrustedKeyHelper trustedKeyHelper,
SshProxyService sshProxyService,
BuildLoggingContext buildLoggingContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
fetchCacheWithRetry(@NotNull GitOperationHelper connector,
@NotNull File cacheDirectory,
@NotNull HashAndSource hashAndSource,
@NotNull BuildLogger buildLogger,
boolean fetchTagsByDefault) |
protected void |
fetchWithRetry(@NotNull GitOperationHelper connector,
@NotNull File targetPath,
@NotNull HashAndSource hashAndSource,
@NotNull BuildLogger buildLogger,
boolean useShallow) |
protected GitRepositoryAccessData |
getAccessData(@NotNull VcsRepositoryData vcsRepositoryData) |
protected File |
getCacheDirectory(@NotNull GitRepositoryAccessData substitutedAccessData)
Deprecated.
since 6.0 use
getCachePath(GitRepositoryAccessData) instead |
protected Path |
getCachePath(@NotNull GitRepositoryAccessData substitutedAccessData) |
@Nullable String |
getGitCapability() |
static @NotNull String |
getSharedCredentialsIdField(@NotNull Map<String,String> config) |
@Nullable String |
getSshCapability() |
protected GitRepositoryAccessData |
getSubstitutedAccessData(@NotNull VcsRepositoryData vcsRepositoryData) |
protected GitRepositoryAccessData.Builder |
getSubstitutedAccessDataBuilder(@NotNull VcsRepositoryData vcsRepositoryData) |
@Nullable File |
getWorkingDirectory() |
static boolean |
isUsingSharedCredentials(@NotNull Map<String,String> serverCfg) |
protected void |
rethrowOrRemoveDirectory(Exception originalException,
GitOperationHelper operationHelper,
BuildLogger buildLogger,
File directory,
String key) |
protected String |
substituteString(@Nullable String stringWithValuesToSubstitute) |
public static final String DEFAULT_BRANCH
protected final SshProxyService sshProxyService
protected final CustomVariableContext customVariableContext
protected final BuildDirectoryManager buildDirectoryManager
protected final com.atlassian.sal.api.message.I18nResolver i18nResolver
protected final TrustedKeyHelper trustedKeyHelper
protected final BuildLoggingContext buildLoggingContext
@Inject public AbstractGitExecutor(CapabilityContext capabilityContext, CredentialsAccessor credentialsAccessor, CustomVariableContext customVariableContext, BuildDirectoryManager buildDirectoryManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, TrustedKeyHelper trustedKeyHelper, SshProxyService sshProxyService, BuildLoggingContext buildLoggingContext)
@Nullable public @Nullable File getWorkingDirectory()
@Nullable public @Nullable String getGitCapability()
@Nullable public @Nullable String getSshCapability()
protected String substituteString(@Nullable @Nullable String stringWithValuesToSubstitute)
public static boolean isUsingSharedCredentials(@NotNull @NotNull Map<String,String> serverCfg)
@NotNull public static @NotNull String getSharedCredentialsIdField(@NotNull @NotNull Map<String,String> config)
protected GitRepositoryAccessData getAccessData(@NotNull @NotNull VcsRepositoryData vcsRepositoryData)
protected GitRepositoryAccessData.Builder getSubstitutedAccessDataBuilder(@NotNull @NotNull VcsRepositoryData vcsRepositoryData)
protected GitRepositoryAccessData getSubstitutedAccessData(@NotNull @NotNull VcsRepositoryData vcsRepositoryData)
@Deprecated protected File getCacheDirectory(@NotNull @NotNull GitRepositoryAccessData substitutedAccessData)
getCachePath(GitRepositoryAccessData)
insteadprotected Path getCachePath(@NotNull @NotNull GitRepositoryAccessData substitutedAccessData)
protected void fetchCacheWithRetry(@NotNull @NotNull GitOperationHelper connector, @NotNull @NotNull File cacheDirectory, @NotNull @NotNull HashAndSource hashAndSource, @NotNull @NotNull BuildLogger buildLogger, boolean fetchTagsByDefault) throws Exception
Exception
protected void fetchWithRetry(@NotNull @NotNull GitOperationHelper connector, @NotNull @NotNull File targetPath, @NotNull @NotNull HashAndSource hashAndSource, @NotNull @NotNull BuildLogger buildLogger, boolean useShallow) throws Exception
Exception
protected void rethrowOrRemoveDirectory(Exception originalException, GitOperationHelper operationHelper, BuildLogger buildLogger, File directory, String key) throws Exception
Exception
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.