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 classstatic classNested 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) booleancheckout(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) protected PollingResultcompareRemoteRevisionWith(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState _baseline) getParamParentJobName(AbstractBuild<?, ?> build) Get the parent job name.static Filehudson.plugins.cloneworkspace.CloneWorkspaceSCM.SnapshotObtains theWorkspaceSnapshotobject that thisSCMpoints to, or throwsCloneWorkspaceSCM.ResolvedFailedExceptionupon 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 theWorkspaceSnapshotobject that thisSCMpoints to, or throwsCloneWorkspaceSCM.ResolvedFailedExceptionupon 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:
checkoutin classSCM- Throws:
IOExceptionInterruptedException
-
createChangeLogParser
- Specified by:
createChangeLogParserin classSCM
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<SCM>- Overrides:
getDescriptorin classSCM
-
getParentBuildFile
-
calcRevisionsFromBuild
public SCMRevisionState calcRevisionsFromBuild(AbstractBuild build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException - Overrides:
calcRevisionsFromBuildin classSCM- Throws:
IOExceptionInterruptedException
-
compareRemoteRevisionWith
protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState _baseline) throws IOException, InterruptedException- Overrides:
compareRemoteRevisionWithin classSCM- Throws:
IOExceptionInterruptedException
-