Class LibraryRetriever
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<LibraryRetriever>
-
- org.jenkinsci.plugins.workflow.libs.LibraryRetriever
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<LibraryRetriever>
- Direct Known Subclasses:
SCMBasedRetriever
public abstract class LibraryRetriever extends AbstractDescribableImpl<LibraryRetriever> implements ExtensionPoint
A way in which a library can be physically obtained for use in a build.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description LibraryRetriever()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description LibraryRetrieverDescriptor
getDescriptor()
abstract void
retrieve(String name, String version, boolean changelog, FilePath target, Run<?,?> run, TaskListener listener)
Obtains library sources.abstract void
retrieve(String name, String version, FilePath target, Run<?,?> run, TaskListener listener)
Obtains library sources.FormValidation
validateVersion(String name, String version)
Deprecated.FormValidation
validateVersion(String name, String version, Item context)
Offer to validate a proposedversion
forretrieve(java.lang.String, java.lang.String, boolean, hudson.FilePath, hudson.model.Run<?, ?>, hudson.model.TaskListener)
.
-
-
-
Method Detail
-
retrieve
public abstract void retrieve(@NonNull String name, @NonNull String version, boolean changelog, @NonNull FilePath target, @NonNull Run<?,?> run, @NonNull TaskListener listener) throws Exception
Obtains library sources.- 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 abstract void retrieve(@NonNull String name, @NonNull String version, @NonNull FilePath target, @NonNull Run<?,?> run, @NonNull TaskListener listener) throws Exception
Obtains library sources.- 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
@Deprecated public FormValidation validateVersion(@NonNull String name, @NonNull String version)
Deprecated.
-
validateVersion
public FormValidation validateVersion(@NonNull String name, @NonNull String version, @CheckForNull Item context)
Offer to validate a proposedversion
forretrieve(java.lang.String, java.lang.String, boolean, hudson.FilePath, hudson.model.Run<?, ?>, hudson.model.TaskListener)
.- Parameters:
name
- the proposed library nameversion
- a proposed versioncontext
- optional context in which this runs- Returns:
- by default, OK
-
getDescriptor
public LibraryRetrieverDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<LibraryRetriever>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<LibraryRetriever>
-
-