Class GitSCMSource

java.lang.Object
hudson.model.AbstractDescribableImpl<jenkins.scm.api.SCMSource>
jenkins.scm.api.SCMSource
jenkins.plugins.git.AbstractGitSCMSource
jenkins.plugins.git.GitSCMSource
All Implemented Interfaces:
ExtensionPoint, Describable<jenkins.scm.api.SCMSource>

public class GitSCMSource extends AbstractGitSCMSource
A SCMSource that discovers branches in a git repository.
  • Field Details

    • LOGGER

      public static final Logger LOGGER
    • IGNORE_TAG_DISCOVERY_TRAIT

      public static boolean IGNORE_TAG_DISCOVERY_TRAIT
      Ignore the tag discovery trait when fetching multibranch Pipelines. Git plugin versions 5.7.0 and earlier will always fetch tags when scanning a multibranch Pipeline, whether or not the tag discovery trait had been added. Releases after git plugin 5.7.0 honor the tag discovery trait when scanning a multibranch Pipeline. If the tag discovery trait has been added, then tags are fetched. If the tag discovery trait has not been added, then tags are not fetched. If honoring the tag discovery trait causes problems for a user, a Java property can be set during Jenkins startup to restore the previous (buggy) behavior. Refer to the plugin documentation for more details.
  • Constructor Details

  • Method Details

    • setCredentialsId

      @DataBoundSetter public void setCredentialsId(@CheckForNull String credentialsId)
    • setTraits

      @DataBoundSetter public void setTraits(List<jenkins.scm.api.trait.SCMSourceTrait> traits)
      Overrides:
      setTraits in class jenkins.scm.api.SCMSource
    • readResolve

      protected Object readResolve() throws ObjectStreamException
      Throws:
      ObjectStreamException
    • isIgnoreOnPushNotifications

      @Deprecated @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince("3.4.0") public boolean isIgnoreOnPushNotifications()
      Deprecated.
    • setBrowser

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @DataBoundSetter public void setBrowser(GitRepositoryBrowser browser)
    • setGitTool

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @DataBoundSetter public void setGitTool(String gitTool)
    • setExtensions

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @DataBoundSetter @Deprecated public void setExtensions(@CheckForNull List<GitSCMExtension> extensions)
      Deprecated.
    • getCredentialsId

      public String getCredentialsId()
      Specified by:
      getCredentialsId in class AbstractGitSCMSource
    • getRemote

      public String getRemote()
      Specified by:
      getRemote in class AbstractGitSCMSource
      Returns:
      Git remote URL
    • getRawRefSpecs

      @Deprecated @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince("3.4.0") public String getRawRefSpecs()
      Deprecated.
    • getRefSpecs

      @Deprecated @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince("3.4.0") protected List<org.eclipse.jgit.transport.RefSpec> getRefSpecs()
      Deprecated.
      Overrides:
      getRefSpecs in class AbstractGitSCMSource
      Returns:
      the ref specs.
    • getTraits

      @NonNull public List<jenkins.scm.api.trait.SCMSourceTrait> getTraits()
      Description copied from class: AbstractGitSCMSource
      Returns the SCMSourceTrait instances for this AbstractGitSCMSource.
      Overrides:
      getTraits in class AbstractGitSCMSource
      Returns:
      the SCMSourceTrait instances