Package hudson.plugins.cloneworkspace
Class CloneWorkspaceSCM
java.lang.Object
hudson.scm.SCM
hudson.plugins.cloneworkspace.CloneWorkspaceSCM
- All Implemented Interfaces:
ExtensionPoint
,Describable<SCM>
SCM
that inherits the workspace from another build through WorkspaceSnapshot
.- Author:
- Kohsuke Kawaguchi, Andrew Bayer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal class
static class
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe criteria by which to choose the build to inherit from.The job name from which we inherit the workspace.Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalcRevisionsFromBuild
(AbstractBuild build, Launcher launcher, TaskListener listener) boolean
checkout
(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) protected PollingResult
compareRemoteRevisionWith
(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState _baseline) getParamParentJobName
(AbstractBuild<?, ?> build) Get the parent job name.static File
hudson.plugins.cloneworkspace.CloneWorkspaceSCM.Snapshot
Obtains theWorkspaceSnapshot
object that thisSCM
points to, or throwsCloneWorkspaceSCM.ResolvedFailedException
upon failing.Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, _for, all, buildEnvironment, buildEnvVars, calcRevisionsFromBuild, checkout, compareRemoteRevisionWith, createEmptyChangeLog, createEmptyChangeLog, getApi, getBrowser, getEffectiveBrowser, getKey, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, guessBrowser, nullify, poll, pollChanges, postCheckout, postCheckout, processWorkspaceBeforeDeletion, processWorkspaceBeforeDeletion, requiresWorkspaceForPolling, supportsPolling
-
Field Details
-
parentJobName
The job name from which we inherit the workspace. -
criteria
The criteria by which to choose the build to inherit from. Can be "Any" (meaning most recent completed build), "Not Failed" (meaning most recent unstable/stable build), or "Successful" (meaning most recent stable build).
-
-
Constructor Details
-
CloneWorkspaceSCM
-
-
Method Details
-
getParamParentJobName
Get the parent job name. Process it for parameters if needed.- Returns:
- Parent job name.
-
resolve
@NonNull public hudson.plugins.cloneworkspace.CloneWorkspaceSCM.Snapshot resolve(String parentJob) throws hudson.plugins.cloneworkspace.CloneWorkspaceSCM.ResolvedFailedException Obtains theWorkspaceSnapshot
object that thisSCM
points to, or throwsCloneWorkspaceSCM.ResolvedFailedException
upon failing.- Parameters:
parentJob
- Processed parent job name.- Returns:
- never null.
- Throws:
hudson.plugins.cloneworkspace.CloneWorkspaceSCM.ResolvedFailedException
-
checkout
public boolean checkout(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException - Overrides:
checkout
in classSCM
- Throws:
IOException
InterruptedException
-
createChangeLogParser
- Specified by:
createChangeLogParser
in classSCM
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<SCM>
- Overrides:
getDescriptor
in classSCM
-
getParentBuildFile
-
calcRevisionsFromBuild
public SCMRevisionState calcRevisionsFromBuild(AbstractBuild build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException - Overrides:
calcRevisionsFromBuild
in classSCM
- Throws:
IOException
InterruptedException
-
compareRemoteRevisionWith
protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState _baseline) throws IOException, InterruptedException- Overrides:
compareRemoteRevisionWith
in classSCM
- Throws:
IOException
InterruptedException
-