modifyWorkspace

Back to index

Summary

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. Refer to the 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

The same as if agentUncPath is set identical to agentDrivePath.

workspaceName
Stringrequired
The workspace name.
agentDrivePath
Stringoptional
Pathname to the root directory of a workspace, for use on Windows, specified with a drive letter.
agentUncPath
Stringoptional
Pathname to the root directory of a workspace, for use on Windows, specified with a UNC path.
agentUnixPath
Stringoptional
Pathname to the root directory of a workspace, for use on UNIX.
credentialName
Stringoptional
The name of the impersonation credential to attach to this workspace.
description
Stringoptional
Comment text describing this object that is not interpreted at all by CloudBees CD/RO.
local
Booleanoptional
True if the workspace is local.
newName
Stringoptional
The new name for an existing object that is being renamed.
workspaceDisabled
Booleanoptional
True means this workspace is disabled.
zoneName
Stringoptional
The zone name.

Usage

Perl

$cmdr->modifyWorkspace( "test-workspaceName" # workspaceName # optionals );

ectool

ectool modifyWorkspace \ "test-workspaceName" `# workspaceName` \ # optionals

Examples

Perl

$cmdr->modifyWorkspace("Test", {description => "QA test workspace"});

ectool

ectool modifyWorkspace "Test" --description "QA test workspace"