public abstract class AbstractGitSCMSource
extends jenkins.scm.api.SCMSource
SCMSource implementations that produce GitSCM implementations.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractGitSCMSource.SCMRevisionImpl
Our implementation.
|
static class |
AbstractGitSCMSource.SpecificRevisionBuildChooser |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_REMOTE_NAME
The default remote name to use when configuring the ref specs to use with fetch operations.
|
static String |
REF_SPEC_DEFAULT
The default ref spec template.
|
static String |
REF_SPEC_REMOTE_NAME_PLACEHOLDER
The regex for
REF_SPEC_REMOTE_NAME_PLACEHOLDER_STR. |
static String |
REF_SPEC_REMOTE_NAME_PLACEHOLDER_STR
The placeholder to use in ref spec templates in order to correctly ensure that the ref spec remote name
matches the remote name.
|
| Constructor and Description |
|---|
AbstractGitSCMSource() |
AbstractGitSCMSource(String id)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
hudson.scm.SCM |
build(jenkins.scm.api.SCMHead head,
jenkins.scm.api.SCMRevision revision) |
protected void |
decorate(GitSCMBuilder<?> builder)
Performs final decoration of the
GitSCMBuilder. |
GitRepositoryBrowser |
getBrowser()
Deprecated.
|
protected static File |
getCacheDir(String cacheEntry) |
protected String |
getCacheEntry() |
protected static Lock |
getCacheLock(String cacheEntry) |
protected com.cloudbees.plugins.credentials.common.StandardUsernameCredentials |
getCredentials() |
abstract String |
getCredentialsId() |
String |
getExcludes()
Deprecated.
use
WildcardSCMSourceFilterTrait |
List<GitSCMExtension> |
getExtensions()
Deprecated.
use corresponding
GitSCMExtensionTrait (and if there isn't one then likely the
GitSCMExtension is not appropriate to use in the context of a SCMSource) |
String |
getGitTool()
Deprecated.
|
String |
getIncludes()
Deprecated.
use
WildcardSCMSourceFilterTrait |
protected List<org.eclipse.jgit.transport.RefSpec> |
getRefSpecs()
Deprecated.
|
abstract String |
getRemote() |
protected List<UserRemoteConfig> |
getRemoteConfigs()
Deprecated.
|
String |
getRemoteName()
Deprecated.
|
List<jenkins.scm.api.trait.SCMSourceTrait> |
getTraits()
Returns the
SCMSourceTrait instances for this AbstractGitSCMSource. |
protected boolean |
isExcluded(String branchName)
Deprecated.
use
WildcardSCMSourceFilterTrait |
protected GitSCMBuilder<?> |
newBuilder(jenkins.scm.api.SCMHead head,
jenkins.scm.api.SCMRevision revision)
Instantiates a new
GitSCMBuilder. |
protected hudson.plugins.git.GitTool |
resolveGitTool()
Deprecated.
|
protected hudson.plugins.git.GitTool |
resolveGitTool(String gitTool)
Resolves the
GitTool. |
protected jenkins.scm.api.SCMRevision |
retrieve(jenkins.scm.api.SCMHead head,
hudson.model.TaskListener listener) |
protected void |
retrieve(jenkins.scm.api.SCMSourceCriteria criteria,
jenkins.scm.api.SCMHeadObserver observer,
jenkins.scm.api.SCMHeadEvent<?> event,
hudson.model.TaskListener listener) |
protected jenkins.scm.api.SCMRevision |
retrieve(String revision,
hudson.model.TaskListener listener) |
protected List<hudson.model.Action> |
retrieveActions(jenkins.scm.api.SCMHead head,
jenkins.scm.api.SCMHeadEvent event,
hudson.model.TaskListener listener) |
protected List<hudson.model.Action> |
retrieveActions(jenkins.scm.api.SCMSourceEvent event,
hudson.model.TaskListener listener) |
protected Set<String> |
retrieveRevisions(hudson.model.TaskListener listener) |
afterSave, build, canProbe, checkInterrupt, createProbe, defaultListener, equals, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetchActions, fetchActions, fetchActions, fetchRevisions, fromSCMFileSystem, getCategories, getCriteria, getDescriptor, getId, getOwner, getPronoun, getTrustedRevision, hashCode, hasId, isCategoryEnabled, newProbe, parentHeads, parentRevisions, retrieve, retrieve, retrieve, retrieve, retrieveActions, setId, setOwner, toString, withIdpublic static final String DEFAULT_REMOTE_NAME
public static final String REF_SPEC_REMOTE_NAME_PLACEHOLDER_STR
The template uses @{...} as that is an illegal sequence in a remote name
public static final String REF_SPEC_REMOTE_NAME_PLACEHOLDER
REF_SPEC_REMOTE_NAME_PLACEHOLDER_STR.public static final String REF_SPEC_DEFAULT
public AbstractGitSCMSource()
@Deprecated public AbstractGitSCMSource(String id)
@CheckForNull public abstract String getCredentialsId()
public abstract String getRemote()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince(value="3.4.0") public String getIncludes()
WildcardSCMSourceFilterTrait@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince(value="3.4.0") public String getExcludes()
WildcardSCMSourceFilterTrait@CheckForNull @Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince(value="3.4.0") public GitRepositoryBrowser getBrowser()
GitBrowserSCMSourceTraitGitRepositoryBrowser to be used with this SCMSource.null if the default tool should be used.@CheckForNull @Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince(value="3.4.0") public String getGitTool()
GitToolSCMSourceTraitnull if the default tool should be used.@NonNull @Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince(value="3.4.0") public List<GitSCMExtension> getExtensions()
GitSCMExtensionTrait (and if there isn't one then likely the
GitSCMExtension is not appropriate to use in the context of a SCMSource)@NonNull public List<jenkins.scm.api.trait.SCMSourceTrait> getTraits()
SCMSourceTrait instances for this AbstractGitSCMSource.SCMSourceTrait instances@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince(value="3.4.0") public String getRemoteName()
RemoteNameSCMSourceTrait@CheckForNull @Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince(value="3.4.0") protected hudson.plugins.git.GitTool resolveGitTool()
resolveGitTool(String).GitTool.GitTool.@CheckForNull protected hudson.plugins.git.GitTool resolveGitTool(String gitTool)
GitTool.gitTool - the ToolInstallation.getName() to resolve.GitTool@CheckForNull
protected jenkins.scm.api.SCMRevision retrieve(@NonNull
jenkins.scm.api.SCMHead head,
@NonNull
hudson.model.TaskListener listener)
throws IOException,
InterruptedException
retrieve in class jenkins.scm.api.SCMSourceIOExceptionInterruptedExceptionprotected void retrieve(@CheckForNull
jenkins.scm.api.SCMSourceCriteria criteria,
@NonNull
jenkins.scm.api.SCMHeadObserver observer,
@CheckForNull
jenkins.scm.api.SCMHeadEvent<?> event,
@NonNull
hudson.model.TaskListener listener)
throws IOException,
InterruptedException
retrieve in class jenkins.scm.api.SCMSourceIOExceptionInterruptedException@CheckForNull
protected jenkins.scm.api.SCMRevision retrieve(@NonNull
String revision,
@NonNull
hudson.model.TaskListener listener)
throws IOException,
InterruptedException
retrieve in class jenkins.scm.api.SCMSourceIOExceptionInterruptedException@NonNull protected Set<String> retrieveRevisions(@NonNull hudson.model.TaskListener listener) throws IOException, InterruptedException
retrieveRevisions in class jenkins.scm.api.SCMSourceIOExceptionInterruptedException@NonNull protected List<hudson.model.Action> retrieveActions(@CheckForNull jenkins.scm.api.SCMSourceEvent event, @NonNull hudson.model.TaskListener listener) throws IOException, InterruptedException
retrieveActions in class jenkins.scm.api.SCMSourceIOExceptionInterruptedException@NonNull protected List<hudson.model.Action> retrieveActions(@NonNull jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMHeadEvent event, @NonNull hudson.model.TaskListener listener) throws IOException, InterruptedException
retrieveActions in class jenkins.scm.api.SCMSourceIOExceptionInterruptedExceptionprotected String getCacheEntry()
@CheckForNull protected com.cloudbees.plugins.credentials.common.StandardUsernameCredentials getCredentials()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince(value="3.4.0") protected List<org.eclipse.jgit.transport.RefSpec> getRefSpecs()
RefSpecsSCMSourceTraitprotected GitSCMBuilder<?> newBuilder(@NonNull jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMRevision revision)
GitSCMBuilder.
Subclasses should override this method if they want to use a custom GitSCMBuilder or if they need
to pre-decorare the builder.head - the SCMHead.revision - the SCMRevision.GitSCMBuilderfor post-decoration.protected void decorate(GitSCMBuilder<?> builder)
GitSCMBuilder. This method is called by
build(SCMHead, SCMRevision) immediately prior to returning GitSCMBuilder.build().
Subclasses should override this method if they need to overrule builder behaviours defined by traits.builder - the builder to decorate.@NonNull
public hudson.scm.SCM build(@NonNull
jenkins.scm.api.SCMHead head,
@CheckForNull
jenkins.scm.api.SCMRevision revision)
build in class jenkins.scm.api.SCMSource@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince(value="3.4.0") protected List<UserRemoteConfig> getRemoteConfigs()
GitSCMBuilder.asRemoteConfigs()UserRemoteConfig instances.@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince(value="3.4.0") protected boolean isExcluded(String branchName)
WildcardSCMSourceFilterTraitbranchName - name of branch to be testedCopyright © 2007–2017. All rights reserved.