Class SubmoduleOption

  • All Implemented Interfaces:

    public class SubmoduleOption
    extends 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 GitSCMExtensions, we decided to keep the git-submodule handling enabled by default, and this extension controls the recursiveness and the option to switch it off.

    Yury V. Zaytsev, Andrew Bayer, Kohsuke Kawaguchi
    • Constructor Detail

      • SubmoduleOption

        public SubmoduleOption()
      • SubmoduleOption

        public SubmoduleOption​(boolean disableSubmodules,
                               boolean recursiveSubmodules,
                               boolean trackingSubmodules,
                               String reference,
                               Integer timeout,
                               boolean parentCredentials)
    • Method Detail

      • isDisableSubmodules

        public boolean isDisableSubmodules()
      • setDisableSubmodules

        public void setDisableSubmodules​(boolean value)
      • isRecursiveSubmodules

        public boolean isRecursiveSubmodules()
      • setRecursiveSubmodules

        public void setRecursiveSubmodules​(boolean value)
      • isTrackingSubmodules

        public boolean isTrackingSubmodules()
      • setTrackingSubmodules

        public void setTrackingSubmodules​(boolean value)
      • isParentCredentials

        public boolean isParentCredentials()
      • setParentCredentials

        public void setParentCredentials​(boolean value)
      • getReference

        public String getReference()
      • setReference

        public void setReference​(String value)
      • getTimeout

        public Integer getTimeout()
      • setTimeout

        public void setTimeout​(Integer value)
      • setShallow

        public void setShallow​(boolean shallow)
      • getShallow

        public boolean getShallow()
      • setDepth

        public void setDepth​(Integer depth)
      • getDepth

        public Integer getDepth()
      • getThreads

        public Integer getThreads()
      • setThreads

        public void setThreads​(Integer threads)
      • onClean

        public void onClean​(GitSCM scm,
                            org.jenkinsci.plugins.gitclient.GitClient git)
                     throws IOException,
        Signals when "git-clean" runs. Primarily for running "git submodule clean" TODO: revisit the abstraction
        onClean in class GitSCMExtension
        scm - GitSCM object
        git - GitClient
        IOException - on input or output error
        InterruptedException - when interrupted
        hudson.plugins.git.GitException - on git error
      • determineSupportForJGit

        public void determineSupportForJGit​(GitSCM scm,
                                            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
        determineSupportForJGit in class GitSCMExtension
        scm - GitSCM object
        cmd - UnsupportedCommand object
      • hashCode

        public int hashCode()
        hashCode in class Object