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 -
Method Summary
Modifier and TypeMethodDescriptionvoidretrieve(String name, String version, boolean changelog, FilePath target, Run<?, ?> run, TaskListener listener) Deprecated.voidprotected voidretrieve3(LibraryRecord record, boolean changelog, FilePath target, Run<?, ?> run, TaskListener listener) Obtains library sources.validateVersion(String name, String version) Deprecated.validateVersion(String name, String version, Item context) Offer to validate a proposedversionforretrieve(java.lang.String, java.lang.String, boolean, hudson.FilePath, hudson.model.Run<?, ?>, hudson.model.TaskListener).
-
Constructor Details
-
LibraryRetriever
public LibraryRetriever()
-
-
Method Details
-
retrieve
@Deprecated public void retrieve(@NonNull String name, @NonNull String version, boolean changelog, @NonNull FilePath target, @NonNull Run<?, ?> run, @NonNull TaskListener listener) throws ExceptionDeprecated.- Throws:
Exception
-
retrieve
@Deprecated public void retrieve(@NonNull String name, @NonNull String version, @NonNull FilePath target, @NonNull Run<?, ?> run, @NonNull TaskListener listener) throws ExceptionDeprecated.- Throws:
Exception
-
retrieve3
protected void retrieve3(@NonNull LibraryRecord record, boolean changelog, @NonNull FilePath target, @NonNull Run<?, ?> run, @NonNull TaskListener listener) throws ExceptionObtains library sources. New implementations should override this method; the default delegates toretrieve(String, String, boolean, FilePath, Run, TaskListener)for backward compatibility with third-party retrievers that have not yet been updated.- 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
Deprecated. -
validateVersion
public FormValidation validateVersion(@NonNull String name, @NonNull String version, @CheckForNull Item context) Offer to validate a proposedversionforretrieve(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
- Specified by:
getDescriptorin interfaceDescribable<LibraryRetriever>
-
retrieve3(org.jenkinsci.plugins.workflow.libs.LibraryRecord, boolean, hudson.FilePath, hudson.model.Run<?, ?>, hudson.model.TaskListener)instead.