Class DiversionSCMSource

java.lang.Object
hudson.model.AbstractDescribableImpl<jenkins.scm.api.SCMSource>
jenkins.scm.api.SCMSource
io.superstudios.plugins.diversion.DiversionSCMSource
All Implemented Interfaces:
ExtensionPoint, Describable<jenkins.scm.api.SCMSource>

public class DiversionSCMSource extends jenkins.scm.api.SCMSource
SCMSource implementation for Diversion repositories - enables Global Pipeline Libraries. This class allows Jenkins to load shared library files (vars/, src/, resources/) from Diversion. The key to appearing in the Modern SCM dropdown is implementing the retrieve(String, TaskListener) method, which workflow-cps-global-lib's getSCMDescriptors() checks for via hudson.Util.isOverridden().
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from class jenkins.scm.api.SCMSource

    jenkins.scm.api.SCMSource.SourceByItem

    Nested classes/interfaces inherited from interface hudson.ExtensionPoint

    ExtensionPoint.LegacyInstancesAreScopedToHudson
  • Field Summary

    Fields inherited from class jenkins.scm.api.SCMSource

    PRONOUN
  • Constructor Summary

    Constructors
    Constructor
    Description
    DiversionSCMSource(String repositoryId, String credentialsId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    build(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision)
     
     
     
     
     
    jenkins.scm.api.SCMRevision
    retrieve(String version, TaskListener listener)
    Required method for Jenkins Global Libraries dropdown visibility.
    protected jenkins.scm.api.SCMRevision
    retrieve(jenkins.scm.api.SCMHead head, TaskListener listener)
     
    protected void
    retrieve(jenkins.scm.api.SCMSourceCriteria criteria, jenkins.scm.api.SCMHeadObserver observer, jenkins.scm.api.SCMHeadEvent<?> event, TaskListener listener)
     
    void
    setDefaultBranch(String defaultBranch)
     
    void
    setLibraryPath(String libraryPath)
     

    Methods inherited from class jenkins.scm.api.SCMSource

    afterSave, build, canProbe, checkInterrupt, createProbe, defaultListener, equals, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetchActions, fetchActions, fetchActions, fetchRevisions, fetchRevisions, fromSCMFileSystem, getCategories, getCriteria, getDescriptor, getId, getOwner, getPronoun, getTraits, getTrustedRevision, hashCode, hasId, isCategoryEnabled, newProbe, parentHeads, parentRevisions, retrieve, retrieve, retrieve, retrieve, retrieve, retrieveActions, retrieveActions, retrieveActions, retrieveRevisions, retrieveRevisions, setId, setOwner, setTraits, toString, withId

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DiversionSCMSource

      @DataBoundConstructor public DiversionSCMSource(String repositoryId, String credentialsId)
  • Method Details

    • getRepositoryId

      public String getRepositoryId()
    • getCredentialsId

      public String getCredentialsId()
    • getLibraryPath

      public String getLibraryPath()
    • setLibraryPath

      @DataBoundSetter public void setLibraryPath(String libraryPath)
    • getDefaultBranch

      public String getDefaultBranch()
    • setDefaultBranch

      @DataBoundSetter public void setDefaultBranch(String defaultBranch)
    • retrieve

      @NonNull public jenkins.scm.api.SCMRevision retrieve(@NonNull String version, @NonNull TaskListener listener) throws IOException, InterruptedException
      Required method for Jenkins Global Libraries dropdown visibility. This is what workflow-cps-global-lib's getSCMDescriptors() checks for.
      Overrides:
      retrieve in class jenkins.scm.api.SCMSource
      Throws:
      IOException
      InterruptedException
    • retrieve

      @CheckForNull protected jenkins.scm.api.SCMRevision retrieve(@NonNull jenkins.scm.api.SCMHead head, @NonNull TaskListener listener) throws IOException, InterruptedException
      Overrides:
      retrieve in class jenkins.scm.api.SCMSource
      Throws:
      IOException
      InterruptedException
    • retrieve

      protected void retrieve(@CheckForNull jenkins.scm.api.SCMSourceCriteria criteria, @NonNull jenkins.scm.api.SCMHeadObserver observer, @CheckForNull jenkins.scm.api.SCMHeadEvent<?> event, @NonNull TaskListener listener) throws IOException, InterruptedException
      Specified by:
      retrieve in class jenkins.scm.api.SCMSource
      Throws:
      IOException
      InterruptedException
    • build

      @NonNull public SCM build(@NonNull jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMRevision revision)
      Specified by:
      build in class jenkins.scm.api.SCMSource