Class SubmoduleOption
java.lang.Object
hudson.model.AbstractDescribableImpl<GitSCMExtension>
hudson.plugins.git.extensions.GitSCMExtension
hudson.plugins.git.extensions.impl.SubmoduleOption
- All Implemented Interfaces:
Describable<GitSCMExtension>
Further tweak the behaviour of git-submodule.
Historically, the submodule support was on by default,
and given the clear marker file in the source tree, I think
keeping this default behaviour is sensible.
So when we split out GitSCMExtension
s, we decided
to keep the git-submodule handling enabled by default,
and this extension controls the recursiveness and the option
to switch it off.
- Author:
- Yury V. Zaytsev, Andrew Bayer, Kohsuke Kawaguchi
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionSubmoduleOption
(boolean disableSubmodules, boolean recursiveSubmodules, boolean trackingSubmodules, String reference, Integer timeout, boolean parentCredentials) -
Method Summary
Modifier and TypeMethodDescriptionvoid
determineSupportForJGit
(GitSCM scm, org.jenkinsci.plugins.gitclient.UnsupportedCommand cmd) Called when support of JGit for a particular or multiple extensions is to be determinedboolean
getDepth()
boolean
int
hashCode()
boolean
boolean
boolean
boolean
void
onCheckoutCompleted
(GitSCM scm, Run<?, ?> build, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener) Called when the checkout was completed and the working directory is filled with files.void
Signals when "git-clean" runs.void
void
setDisableSubmodules
(boolean value) void
setParentCredentials
(boolean value) void
setRecursiveSubmodules
(boolean value) void
setReference
(String value) void
setShallow
(boolean shallow) void
setThreads
(Integer threads) void
setTimeout
(Integer value) void
setTrackingSubmodules
(boolean value) toString()
Methods inherited from class hudson.plugins.git.extensions.GitSCMExtension
beforeCheckout, beforeCheckout, decorate, decorateCheckoutCommand, decorateCheckoutCommand, decorateCloneCommand, decorateCloneCommand, decorateFetchCommand, decorateFetchCommand, decorateMergeCommand, decorateMergeCommand, decorateRevisionToBuild, decorateRevisionToBuild, enableMultipleRevisionDetection, getDescriptor, getRequiredClient, getWorkingDirectory, getWorkingDirectory, isRevExcluded, onCheckoutCompleted, populateEnvironmentVariables, requiresWorkspaceForPolling
-
Constructor Details
-
SubmoduleOption
@DataBoundConstructor public SubmoduleOption() -
SubmoduleOption
-
-
Method Details
-
isDisableSubmodules
public boolean isDisableSubmodules() -
setDisableSubmodules
@DataBoundSetter public void setDisableSubmodules(boolean value) -
isRecursiveSubmodules
public boolean isRecursiveSubmodules() -
setRecursiveSubmodules
@DataBoundSetter public void setRecursiveSubmodules(boolean value) -
isTrackingSubmodules
public boolean isTrackingSubmodules() -
setTrackingSubmodules
@DataBoundSetter public void setTrackingSubmodules(boolean value) -
isParentCredentials
public boolean isParentCredentials() -
setParentCredentials
@DataBoundSetter public void setParentCredentials(boolean value) -
getReference
-
setReference
-
getTimeout
-
setTimeout
-
setShallow
@DataBoundSetter public void setShallow(boolean shallow) -
getShallow
public boolean getShallow() -
setDepth
-
getDepth
-
getThreads
-
setThreads
-
onClean
public void onClean(GitSCM scm, org.jenkinsci.plugins.gitclient.GitClient git) throws IOException, InterruptedException, hudson.plugins.git.GitException Signals when "git-clean" runs. Primarily for running "git submodule clean" TODO: revisit the abstraction- Overrides:
onClean
in classGitSCMExtension
- Parameters:
scm
- GitSCM objectgit
- GitClient- Throws:
IOException
- on input or output errorInterruptedException
- when interruptedhudson.plugins.git.GitException
- on git error
-
onCheckoutCompleted
public void onCheckoutCompleted(GitSCM scm, Run<?, ?> build, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener) throws IOException, InterruptedException, hudson.plugins.git.GitExceptionCalled when the checkout was completed and the working directory is filled with files. SeeSCM.checkout(Run, Launcher, FilePath, TaskListener, File, SCMRevisionState)
for the available parameters, exceptworkingDirectory
Do not move the HEAD to another commit, as by this point the commit to be built is already determined and recorded (such as changelog.)- Overrides:
onCheckoutCompleted
in classGitSCMExtension
- Parameters:
scm
- GitSCM objectbuild
- run contextgit
- GitClientlistener
- build log- Throws:
IOException
- on input or output errorInterruptedException
- when interruptedhudson.plugins.git.GitException
- on git error
-
determineSupportForJGit
public void determineSupportForJGit(GitSCM scm, @NonNull org.jenkinsci.plugins.gitclient.UnsupportedCommand cmd) Description copied from class:GitSCMExtension
Called when support of JGit for a particular or multiple extensions is to be determined- Overrides:
determineSupportForJGit
in classGitSCMExtension
- Parameters:
scm
- GitSCM objectcmd
- UnsupportedCommand object
-
equals
-
hashCode
public int hashCode() -
toString
-