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 ClassesNested classes/interfaces inherited from class jenkins.scm.api.SCMSource
jenkins.scm.api.SCMSource.SourceByItemNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class jenkins.scm.api.SCMSource
PRONOUN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(jenkins.scm.api.SCMHead head, jenkins.scm.api.SCMRevision revision) jenkins.scm.api.SCMRevisionretrieve(String version, TaskListener listener) Required method for Jenkins Global Libraries dropdown visibility.protected jenkins.scm.api.SCMRevisionretrieve(jenkins.scm.api.SCMHead head, TaskListener listener) protected voidretrieve(jenkins.scm.api.SCMSourceCriteria criteria, jenkins.scm.api.SCMHeadObserver observer, jenkins.scm.api.SCMHeadEvent<?> event, TaskListener listener) voidsetDefaultBranch(String defaultBranch) voidsetLibraryPath(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
-
Constructor Details
-
DiversionSCMSource
-
-
Method Details
-
getRepositoryId
-
getCredentialsId
-
getLibraryPath
-
setLibraryPath
-
getDefaultBranch
-
setDefaultBranch
-
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:
retrievein classjenkins.scm.api.SCMSource- Throws:
IOExceptionInterruptedException
-
retrieve
@CheckForNull protected jenkins.scm.api.SCMRevision retrieve(@NonNull jenkins.scm.api.SCMHead head, @NonNull TaskListener listener) throws IOException, InterruptedException - Overrides:
retrievein classjenkins.scm.api.SCMSource- Throws:
IOExceptionInterruptedException
-
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:
retrievein classjenkins.scm.api.SCMSource- Throws:
IOExceptionInterruptedException
-
build
@NonNull public SCM build(@NonNull jenkins.scm.api.SCMHead head, @CheckForNull jenkins.scm.api.SCMRevision revision) - Specified by:
buildin classjenkins.scm.api.SCMSource
-