Workspace

3 minute readReference

createWorkspace

Creates a new workspace. A workspace definition consists of three paths to access the workspace in various ways:

agentDrivePath

agentUncPath - The agent uses agentUncPath and agentDrivePath to compute the drive mapping needed to make agentDrivePath valid in the step (see examples below).

agentUnixPath

Examples for agentDrivePath and agentUncPath :

agentDrivePath agentUncPath Result from running a step in "job123" that uses this workspace

N:\

\\server\share

The agent maps \\server\share to drive n: and runs the step in ` n:\job123`.

N:\sub1

\\server\share\dir1\sub1

The agent maps \\server\share\dir1 to drive n: and runs the step in ` n:\sub1\job123`.

N:\sub1

\\server\share\dir1

Invalid! No mapping can be deduced from this pair of values.

C:\ws

C:\ws

A local workspace on the agent. No drive mapping is needed. The job step runs in ` c:\ws\job123`.

C:\ws

Same as if agentUncPath were set identical to agentDrivePath.

Arguments

Argument Name Type Description

workspaceName

String

(Required) The workspace name.

agentDrivePath

String

Pathname to the root directory of a workspace, for use on Windows, specified with a drive letter.

agentUncPath

String

Pathname to the root directory of a workspace, for use on Windows, specified with a UNC path.

agentUnixPath

String

Pathname to the root directory of a workspace, for use on UNIX.

credentialName

String

The name of the impersonation credential to attach to this workspace.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

local

Boolean

True if the workspace is local.

workspaceDisabled

Boolean

True means this workspace is disabled.

zoneName

String

The zone name.

Positional arguments

workspaceName

Usage

ec-perl

$cmdr->createWorkspace(<workspaceName>, {<optionals>});

ectool

ectool createWorkspace workspaceName, [optionals]

deleteWorkspace

Deletes a workspace.

Arguments

Argument Name Type Description

workspaceName

String

(Required) The workspace name.

Positional arguments

workspaceName

Usage

ec-perl

$cmdr->deleteWorkspace(<workspaceName>);

ectool

ectool deleteWorkspace workspaceName

getWorkspace

Retrieves a workspace by its name.

Arguments

Argument Name Type Description

workspaceName

String

(Required) The workspace name.

Positional arguments

workspaceName

Usage

ec-perl

$cmdr->getWorkspace(<workspaceName>);

ectool

ectool getWorkspace workspaceName

getWorkspaces

Retrieves all workspaces.

Arguments

None.

Positional arguments

None.

Usage

ec-perl

$cmdr->getWorkspaces();

ectool

ectool getWorkspaces

modifyWorkspace

Modifies an existing workspace.

A workspace definition consists of three paths to access the workspace in various ways:

agentDrivePath

agentUncPath - The agent uses agentUncPath and agentDrivePath to compute the drive mapping needed to make agentDrivePath valid in the step (see examples below).

agentUnixPath

Examples for agentDrivePath and agentUncPath :

agentDrivePath agentUncPath Result from running a step in "job123" that uses this workspace

N:\

`\\server\share `

The agent maps \\server\share to drive n: and runs the step in n:\job123.

N:\sub1

\\server\share\dir1\sub1

The agent maps \\server\share\dir1 to drive n: and runs the step in n:\sub1\job123.

N:\sub1

`\\server\share\dir1 `

Invalid! No mapping can be deduced from this pair of values.

C:\ws

C:\ws

A local workspace on the agent. No drive mapping is needed. The job step runs in c:\ws\job123.

C:\ws

Same as if agentUncPath were set identical to agentDrivePath.

Arguments

Argument Name Type Description

workspaceName

String

(Required) The workspace name.

agentDrivePath

String

Pathname to the root directory of a workspace, for use on Windows, specified with a drive letter.

agentUncPath

String

Pathname to the root directory of a workspace, for use on Windows, specified with a UNC path.

agentUnixPath

String

Pathname to the root directory of a workspace, for use on UNIX.

credentialName

String

The name of the impersonation credential to attach to this workspace.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

local

Boolean

True if the workspace is local.

newName

String

The new name for an existing object that is being renamed.

workspaceDisabled

Boolean

True means this workspace is disabled.

zoneName

String

The zone name.

Positional arguments

workspaceName

Usage

ec-perl

$cmdr->modifyWorkspace(<workspaceName>, {<optionals>});

ectool

ectool modifyWorkspace workspaceName, [optionals]