Class SCMSourceRetriever
java.lang.Object
hudson.model.AbstractDescribableImpl<LibraryRetriever>
org.jenkinsci.plugins.workflow.libs.LibraryRetriever
org.jenkinsci.plugins.workflow.libs.SCMBasedRetriever
org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever
- All Implemented Interfaces:
ExtensionPoint,Describable<LibraryRetriever>
Uses
SCMSource.fetch(String, TaskListener) to retrieve a specific revision.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from class org.jenkinsci.plugins.workflow.libs.SCMBasedRetriever
SCMBasedRetriever.SCMBasedRetrieverDescriptor, SCMBasedRetriever.WorkspaceListenerNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class org.jenkinsci.plugins.workflow.libs.SCMBasedRetriever
INCLUDE_SRC_TEST_IN_LIBRARIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjenkins.scm.api.SCMSourcegetScm()A source of SCM checkouts.protected voidretrieve3(LibraryRecord record, boolean changelog, FilePath target, Run<?, ?> run, TaskListener listener) Obtains library sources.validateVersion(String name, String version, Item context) Offer to validate a proposedversionforLibraryRetriever.retrieve(java.lang.String, java.lang.String, boolean, hudson.FilePath, hudson.model.Run<?, ?>, hudson.model.TaskListener).Methods inherited from class org.jenkinsci.plugins.workflow.libs.SCMBasedRetriever
doRetrieve, doRetrieve, getLibraryPath, isClone, retrySCMOperation, setClone, setLibraryPathMethods inherited from class org.jenkinsci.plugins.workflow.libs.LibraryRetriever
getDescriptor, retrieve, retrieve, validateVersion
-
Constructor Details
-
SCMSourceRetriever
@DataBoundConstructor public SCMSourceRetriever(jenkins.scm.api.SCMSource scm)
-
-
Method Details
-
getScm
public jenkins.scm.api.SCMSource getScm()A source of SCM checkouts. -
retrieve3
protected void retrieve3(LibraryRecord record, boolean changelog, FilePath target, Run<?, ?> run, TaskListener listener) throws ExceptionDescription copied from class:LibraryRetrieverObtains library sources. New implementations should override this method; the default delegates toLibraryRetriever.retrieve(String, String, boolean, FilePath, Run, TaskListener)for backward compatibility with third-party retrievers that have not yet been updated.- Overrides:
retrieve3in classLibraryRetriever- Parameters:
record- full record of this library's configuration for this build; useLibraryRecord.getName()andLibraryRecord.getVersion()in place of the formernameandversionparameterschangelog- whether to include changesets in the library in jobs using it fromLibraryConfiguration.getIncludeInChangesets()target- a directory in which to check out sources; should createsrc/**/*.groovyand/orvars/*.groovy, and optionally alsoresources/run- a build which will use the librarylistener- a way to report progress- Throws:
Exception- if there is any problem (useAbortExceptionfor user errors)
-
validateVersion
Description copied from class:LibraryRetrieverOffer to validate a proposedversionforLibraryRetriever.retrieve(java.lang.String, java.lang.String, boolean, hudson.FilePath, hudson.model.Run<?, ?>, hudson.model.TaskListener).- Overrides:
validateVersionin classLibraryRetriever- Parameters:
name- the proposed library nameversion- a proposed versioncontext- optional context in which this runs- Returns:
- by default, OK
-