public abstract class Workspace extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BASENAME
Base name of the workspace under the node.
|
protected static String |
BOOTSTRAP
Name of the BUILDOUT bootstrap module.
|
static String |
PACKAGES
Base name of the folder containing the packages.
|
protected static String |
PIP
Name of the PIP wheel.
|
protected static String |
SETUPTOOLS
Name of the SETUPTOOLS wheel.
|
protected static String |
VIRTUALENV
Name of the VIRTUALENV module.
|
protected static String |
WHEEL
Name of the WHEEL wheel.
|
Constructor and Description |
---|
Workspace(hudson.FilePath home)
Constructor using fields.
|
Modifier and Type | Method and Description |
---|---|
protected void |
delete()
Delete this workspace without throwing exceptions on error.
|
static void |
delete(hudson.model.Item item)
Clean item related workspaces.
|
static void |
delete(hudson.model.Item item,
String name)
Clean item related workspaces.
|
static Workspace |
fromBuild(hudson.model.AbstractBuild<?,?> build)
Create a workspace from the build.
|
static Workspace |
fromHome(hudson.FilePath home)
Create the workspace from its home folder.
|
static Workspace |
fromNode(hudson.model.Node node,
hudson.model.AbstractProject<?,?> project,
String name)
Create a workspace from the node and the project.
|
static Workspace |
fromProject(hudson.model.Project<?,?> project,
String name)
Get a workspace from a project.
|
hudson.FilePath |
getBootstrapPy()
Get the BUILDOUT bootstrap module file on executor.
|
String |
getBootstrapPyContent()
Get the BUILDOUT bootstrap module content.
|
hudson.FilePath |
getBuildoutHome(String name)
Get the VIRTUALENV home dedicated to BUILDOUT for the provided PYTHON
installation name.
|
hudson.FilePath |
getHome()
Get the home folder of this workspace.
|
hudson.FilePath |
getMasterPackagesDir()
Get the folder on master where user can put some packages to avoid
downloads when creating a VIRTUALENV.
|
abstract hudson.FilePath |
getPackagesDir()
Get the folder on executor containing the packages provided by user to
avoid downloads when creating a VIRTUALENV.
|
hudson.FilePath |
getToolsHome()
Get the VIRTUALENV home for this workspace, where TOX (or other tools)
can be installed for instance.
|
hudson.FilePath |
getVirtualenvHome(String name)
Get the VIRTUALENV home for the provided VIRTUALENV name.
|
hudson.FilePath |
getVirtualenvPy()
Get the VIRTUALENV module file on executor.
|
String |
getVirtualenvPyContent()
Get the VIRTUALENV module content.
|
public static String BASENAME
public static String PACKAGES
protected static String VIRTUALENV
protected static String SETUPTOOLS
protected static String PIP
protected static String WHEEL
protected static String BOOTSTRAP
public Workspace(hudson.FilePath home)
home
- The home folder of the workspace.public hudson.FilePath getHome()
public String getVirtualenvPyContent() throws IOException
IOException
public hudson.FilePath getVirtualenvPy() throws IOException, InterruptedException
IOException
InterruptedException
public String getBootstrapPyContent() throws IOException
IOException
public hudson.FilePath getBootstrapPy() throws IOException, InterruptedException
IOException
InterruptedException
public hudson.FilePath getMasterPackagesDir() throws IOException, InterruptedException
IOException
InterruptedException
public abstract hudson.FilePath getPackagesDir() throws IOException, InterruptedException
IOException
InterruptedException
public hudson.FilePath getToolsHome()
public hudson.FilePath getVirtualenvHome(String name)
name
- The name of the VIRTUALENVpublic hudson.FilePath getBuildoutHome(String name)
name
- The name of the PYTHON installationprotected void delete()
public static Workspace fromHome(hudson.FilePath home)
home
- The home folderpublic static Workspace fromBuild(hudson.model.AbstractBuild<?,?> build)
build
- The buildpublic static Workspace fromProject(hudson.model.Project<?,?> project, String name)
project
- The projectname
- Base name used to compute the workspace location. If null then
use the name of the projectpublic static Workspace fromNode(hudson.model.Node node, hudson.model.AbstractProject<?,?> project, String name)
node
- The nodeproject
- The projectname
- Base name used to compute the workspace location. If null then
use the name of the projectpublic static void delete(hudson.model.Item item)
item
- The itempublic static void delete(hudson.model.Item item, String name)
item
- The itemname
- The name to use to compute the workspace locationCopyright © 2004-2018. All Rights Reserved.