hudson
Class FileSystemProvisioner.Default

java.lang.Object
  extended by hudson.FileSystemProvisioner
      extended by hudson.FileSystemProvisioner.Default
All Implemented Interfaces:
ExtensionPoint, Describable<FileSystemProvisioner>
Enclosing class:
FileSystemProvisioner

public static final class FileSystemProvisioner.Default
extends FileSystemProvisioner

Default implementation that doesn't rely on any file system specific capability, and thus can be used anywhere that Hudson runs.


Nested Class Summary
static class FileSystemProvisioner.Default.DescriptorImpl
           
static class FileSystemProvisioner.Default.WorkspaceSnapshotImpl
           
 
Nested classes/interfaces inherited from class hudson.FileSystemProvisioner
FileSystemProvisioner.Default
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.FileSystemProvisioner
DEFAULT
 
Constructor Summary
FileSystemProvisioner.Default()
           
 
Method Summary
 void discardWorkspace(AbstractProject<?,?> project, FilePath ws)
          When a project is deleted, this method is called to undo the effect of FileSystemProvisioner.prepareWorkspace(AbstractBuild, FilePath, TaskListener).
 void prepareWorkspace(AbstractBuild<?,?> build, FilePath ws, TaskListener listener)
          Called very early in the build (before a build places any files in the workspace, such as SCM checkout) to provision a workspace for the build.
 WorkspaceSnapshot snapshot(AbstractBuild<?,?> build, FilePath ws, String glob, TaskListener listener)
          Creates a tar ball.
 WorkspaceSnapshot snapshot(AbstractBuild<?,?> build, FilePath ws, TaskListener listener)
          Deprecated. as of 1.350
 
Methods inherited from class hudson.FileSystemProvisioner
all, getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemProvisioner.Default

public FileSystemProvisioner.Default()
Method Detail

prepareWorkspace

public void prepareWorkspace(AbstractBuild<?,?> build,
                             FilePath ws,
                             TaskListener listener)
                      throws IOException,
                             InterruptedException
Description copied from class: FileSystemProvisioner
Called very early in the build (before a build places any files in the workspace, such as SCM checkout) to provision a workspace for the build.

This method can prepare the underlying file system in preparation for the later #snapshot(AbstractBuild, FilePath, TaskListener). TODO : the method needs to be able to see the snapshot would be later needed. In fact, perhaps we should only call this method when Hudson knows that a snapshot is later needed?

Specified by:
prepareWorkspace in class FileSystemProvisioner
ws - New workspace should be prepared in this location. This is the same value as build.getProject().getWorkspace() but passed separately for convenience.
Throws:
IOException
InterruptedException

discardWorkspace

public void discardWorkspace(AbstractProject<?,?> project,
                             FilePath ws)
                      throws IOException,
                             InterruptedException
Description copied from class: FileSystemProvisioner
When a project is deleted, this method is called to undo the effect of FileSystemProvisioner.prepareWorkspace(AbstractBuild, FilePath, TaskListener).

Specified by:
discardWorkspace in class FileSystemProvisioner
Parameters:
project - Project whose workspace is being discarded.
ws - Workspace to be discarded. This workspace is on the node this FileSystemProvisioner is provisioned for.
Throws:
IOException
InterruptedException

snapshot

public WorkspaceSnapshot snapshot(AbstractBuild<?,?> build,
                                  FilePath ws,
                                  TaskListener listener)
                           throws IOException,
                                  InterruptedException
Deprecated. as of 1.350

Throws:
IOException
InterruptedException

snapshot

public WorkspaceSnapshot snapshot(AbstractBuild<?,?> build,
                                  FilePath ws,
                                  String glob,
                                  TaskListener listener)
                           throws IOException,
                                  InterruptedException
Creates a tar ball.

Specified by:
snapshot in class FileSystemProvisioner
ws - New workspace should be prepared in this location. This is the same value as build.getWorkspace() but passed separately for convenience.
glob - Ant-style file glob for files to include in the snapshot. May not be pertinent for all implementations.
Throws:
IOException
InterruptedException


Copyright © 2004-2013. All Rights Reserved.