Class NexusRetriever
java.lang.Object
hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.libs.LibraryRetriever>
org.jenkinsci.plugins.workflow.libs.LibraryRetriever
com.roylenferink.jenkins.plugins.workflow.libs.NexusRetriever
- All Implemented Interfaces:
ExtensionPoint
,Describable<org.jenkinsci.plugins.workflow.libs.LibraryRetriever>
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class NexusRetriever
extends org.jenkinsci.plugins.workflow.libs.LibraryRetriever
The goal of this plugin is to provide another way to retrieve shared libraries via the @Library declaration
in a Jenkinsfile.
The current official pipeline-groovy-lib-plugin only provides a way to retrieve shared libraries through an SCM, such as Git, Subversion, etc.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.jenkinsci.plugins.workflow.libs.LibraryRetrieverDescriptor
void
retrieve
(String name, String version, boolean changelog, FilePath target, Run<?, ?> run, TaskListener listener) Checks first if the library is accessible via a HEAD call.void
Retrieves the shared library code.Methods inherited from class org.jenkinsci.plugins.workflow.libs.LibraryRetriever
validateVersion, validateVersion
-
Constructor Details
-
Method Details
-
getArtifactDetails
-
getMavenHome
-
retrieve
public void retrieve(@NonNull String name, @NonNull String version, @NonNull FilePath target, @NonNull Run<?, ?> run, @NonNull TaskListener listener) throws ExceptionRetrieves the shared library code. Prefer this version of the method.Checks first if the library is accessible via a HEAD call. Then retrieves the shared library from Nexus.
- Specified by:
retrieve
in classorg.jenkinsci.plugins.workflow.libs.LibraryRetriever
- Parameters:
name
- Name of the library (as specified in the Jenkinsfile @Library)version
- Version of the library (as specified in the Jenkinsfile @Library)target
- Where the code should be retrievedrun
- Jenkins contextlistener
- Only used to get the logger- Throws:
Exception
- if the file cannot be downloaded, archive can't be extracted, workspace is not writable
-
retrieve
public void retrieve(@NonNull String name, @NonNull String version, boolean changelog, @NonNull FilePath target, @NonNull Run<?, ?> run, @NonNull TaskListener listener) throws ExceptionChecks first if the library is accessible via a HEAD call. Then retrieves the shared library from Nexus.- Specified by:
retrieve
in classorg.jenkinsci.plugins.workflow.libs.LibraryRetriever
- Parameters:
name
- Name of the library (as specified in the Jenkinsfile @Library)version
- Version of the library (as specified in the Jenkinsfile @Library)changelog
- Not usedtarget
- Where the code should be retrievedrun
- Jenkins contextlistener
- Only used to get the logger- Throws:
Exception
- if the file cannot be downloaded, archive can't be extracted, workspace is not writable
-
getDescriptor
public org.jenkinsci.plugins.workflow.libs.LibraryRetrieverDescriptor getDescriptor()- Specified by:
getDescriptor
in interfaceDescribable<org.jenkinsci.plugins.workflow.libs.LibraryRetriever>
- Overrides:
getDescriptor
in classorg.jenkinsci.plugins.workflow.libs.LibraryRetriever
-