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.voidretrieve(String name, String version, boolean changelog, FilePath target, Run<?, ?> run, TaskListener listener) Obtains library sources.voidObtains 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, getLibraryPath, isClone, retrySCMOperation, setClone, setLibraryPathMethods inherited from class org.jenkinsci.plugins.workflow.libs.LibraryRetriever
getDescriptor, 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. -
retrieve
public void retrieve(String name, String version, boolean changelog, FilePath target, Run<?, ?> run, TaskListener listener) throws ExceptionDescription copied from class:LibraryRetrieverObtains library sources.- Specified by:
retrievein classLibraryRetriever- Parameters:
name- theLibraryConfiguration.getName()version- the version of the library, such as fromLibraryConfiguration.getDefaultVersion()or an overridechangelog- 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)
-
retrieve
public void retrieve(String name, String version, FilePath target, Run<?, ?> run, TaskListener listener) throws ExceptionDescription copied from class:LibraryRetrieverObtains library sources.- Specified by:
retrievein classLibraryRetriever- Parameters:
name- theLibraryConfiguration.getName()version- the version of the library, such as fromLibraryConfiguration.getDefaultVersion()or an overridetarget- 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
-