@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class NexusRetriever
extends org.jenkinsci.plugins.workflow.libs.LibraryRetriever
The current official plugin (workflow-cps-global-lib) does provide only a way to retrieve shared libraries through a SCM, such as Git, Subversion, etc.
| Modifier and Type | Class and Description |
|---|---|
static class |
NexusRetriever.DescriptorImpl |
| Constructor and Description |
|---|
NexusRetriever(String artifactDetails,
String mavenHome)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getArtifactDetails() |
org.jenkinsci.plugins.workflow.libs.LibraryRetrieverDescriptor |
getDescriptor() |
String |
getMavenHome() |
void |
retrieve(String name,
String version,
boolean changelog,
hudson.FilePath target,
hudson.model.Run<?,?> run,
hudson.model.TaskListener listener)
Checks first if the library is accessible via a HEAD call.
|
void |
retrieve(String name,
String version,
hudson.FilePath target,
hudson.model.Run<?,?> run,
hudson.model.TaskListener listener)
Retrieves the shared library code.
|
public String getArtifactDetails()
public String getMavenHome()
public void retrieve(@Nonnull String name, @Nonnull String version, @Nonnull hudson.FilePath target, @Nonnull hudson.model.Run<?,?> run, @Nonnull hudson.model.TaskListener listener) throws Exception
Checks first if the library is accessible via a HEAD call. Then retrieves the shared library from Nexus.
retrieve in class org.jenkinsci.plugins.workflow.libs.LibraryRetrievername - 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 loggerException - if the file cannot be downloaded, archive can't be extracted, workspace is not writablepublic void retrieve(@Nonnull String name, @Nonnull String version, @Nonnull boolean changelog, @Nonnull hudson.FilePath target, @Nonnull hudson.model.Run<?,?> run, @Nonnull hudson.model.TaskListener listener) throws Exception
retrieve in class org.jenkinsci.plugins.workflow.libs.LibraryRetrievername - 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 loggerException - if the file cannot be downloaded, archive can't be extracted, workspace is not writablepublic org.jenkinsci.plugins.workflow.libs.LibraryRetrieverDescriptor getDescriptor()
getDescriptor in interface hudson.model.Describable<org.jenkinsci.plugins.workflow.libs.LibraryRetriever>getDescriptor in class org.jenkinsci.plugins.workflow.libs.LibraryRetrieverCopyright © 2016–2021. All rights reserved.