Class SCMRetriever
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<LibraryRetriever>
-
- org.jenkinsci.plugins.workflow.libs.LibraryRetriever
-
- org.jenkinsci.plugins.workflow.libs.SCMBasedRetriever
-
- org.jenkinsci.plugins.workflow.libs.SCMRetriever
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<LibraryRetriever>
public class SCMRetriever extends SCMBasedRetriever
Uses legacySCM
to check out sources based on variable interpolation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SCMRetriever.DescriptorImpl
static class
SCMRetriever.Hider
-
Nested classes/interfaces inherited from class org.jenkinsci.plugins.workflow.libs.SCMBasedRetriever
SCMBasedRetriever.SCMBasedRetrieverDescriptor, SCMBasedRetriever.WorkspaceListener
-
Nested 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 Constructor Description SCMRetriever(SCM scm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SCM
getScm()
void
retrieve(String name, String version, boolean changelog, FilePath target, Run<?,?> run, TaskListener listener)
Obtains library sources.void
retrieve(String name, String version, FilePath target, Run<?,?> run, TaskListener listener)
Obtains library sources.FormValidation
validateVersion(String name, String version, Item context)
Offer to validate a proposedversion
forLibraryRetriever.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, setLibraryPath
-
Methods inherited from class org.jenkinsci.plugins.workflow.libs.LibraryRetriever
getDescriptor, validateVersion
-
-
-
-
Constructor Detail
-
SCMRetriever
@DataBoundConstructor public SCMRetriever(SCM scm)
-
-
Method Detail
-
getScm
public SCM getScm()
-
retrieve
public void retrieve(String name, String version, boolean changelog, FilePath target, Run<?,?> run, TaskListener listener) throws Exception
Description copied from class:LibraryRetriever
Obtains library sources.- Specified by:
retrieve
in 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/**
/*.groovy
and/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 (useAbortException
for user errors)
-
retrieve
public void retrieve(String name, String version, FilePath target, Run<?,?> run, TaskListener listener) throws Exception
Description copied from class:LibraryRetriever
Obtains library sources.- Specified by:
retrieve
in 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/**
/*.groovy
and/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 (useAbortException
for user errors)
-
validateVersion
public FormValidation validateVersion(String name, String version, Item context)
Description copied from class:LibraryRetriever
Offer to validate a proposedversion
forLibraryRetriever.retrieve(java.lang.String, java.lang.String, boolean, hudson.FilePath, hudson.model.Run<?, ?>, hudson.model.TaskListener)
.- Overrides:
validateVersion
in classLibraryRetriever
- Parameters:
name
- the proposed library nameversion
- a proposed versioncontext
- optional context in which this runs- Returns:
- by default, OK
-
-