Package jenkins.plugins.git
Class GitSCMSourceDefaults
java.lang.Object
hudson.model.AbstractDescribableImpl<GitSCMExtension>
hudson.plugins.git.extensions.GitSCMExtension
jenkins.plugins.git.GitSCMSourceDefaults
- All Implemented Interfaces:
Describable<GitSCMExtension>
Used to reset the default clone behaviour for
GitSCM
instances created by GitSCMBuilder
.
Does not have a descriptor as we do not expect this extension to be user-visible.
With this extension, we anticipate:
- tags will not be cloned or fetched
- refspecs will be honoured on clone
- Since:
- 3.4.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
decorateCloneCommand
(GitSCM scm, Run<?, ?> build, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener, org.jenkinsci.plugins.gitclient.CloneCommand cmd) Called before aCloneCommand
is executed to allow extensions to alter its behaviour.void
decorateFetchCommand
(GitSCM scm, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener, org.jenkinsci.plugins.gitclient.FetchCommand cmd) Deprecated.boolean
int
hashCode()
toString()
Methods inherited from class hudson.plugins.git.extensions.GitSCMExtension
beforeCheckout, beforeCheckout, decorate, decorateCheckoutCommand, decorateCheckoutCommand, decorateCloneCommand, decorateFetchCommand, decorateMergeCommand, decorateMergeCommand, decorateRevisionToBuild, decorateRevisionToBuild, determineSupportForJGit, enableMultipleRevisionDetection, getDescriptor, getRequiredClient, getWorkingDirectory, getWorkingDirectory, isRevExcluded, onCheckoutCompleted, onCheckoutCompleted, onClean, populateEnvironmentVariables, requiresWorkspaceForPolling
-
Constructor Details
-
GitSCMSourceDefaults
public GitSCMSourceDefaults(boolean includeTags) Constructor.- Parameters:
includeTags
-true
to request fetching tags.
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
-
decorateCloneCommand
public void decorateCloneCommand(GitSCM scm, Run<?, ?> build, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener, org.jenkinsci.plugins.gitclient.CloneCommand cmd) throws IOException, InterruptedException, hudson.plugins.git.GitExceptionCalled before aCloneCommand
is executed to allow extensions to alter its behaviour.- Overrides:
decorateCloneCommand
in classGitSCMExtension
- Parameters:
scm
- GitSCM objectbuild
- run contextgit
- GitClientlistener
- build logcmd
- clone command to be decorated- Throws:
IOException
- on input or output errorInterruptedException
- when interruptedhudson.plugins.git.GitException
- on git error
-
decorateFetchCommand
@Deprecated public void decorateFetchCommand(GitSCM scm, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener, org.jenkinsci.plugins.gitclient.FetchCommand cmd) throws IOException, InterruptedException, hudson.plugins.git.GitException Deprecated.Called before aFetchCommand
is executed to allow extensions to alter its behaviour.- Overrides:
decorateFetchCommand
in classGitSCMExtension
- Parameters:
scm
- GitSCM objectgit
- GitClientlistener
- build logcmd
- fetch command to be decorated- Throws:
IOException
- on input or output errorInterruptedException
- when interruptedhudson.plugins.git.GitException
- on git error
-