Groovy API reference

Release

5 minute readReference

addSubrelease

Adds a subrelease to a given release.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

releaseName

String

(Required) The name of the release.

subreleaseName

String

(Required) The name of the subrelease.

subreleaseProject

String

The name of the subrelease project.

Positional arguments

projectName, releaseName, subreleaseName

Usage

ec-perl

$cmdr->addSubrelease(<projectName>, <releaseName>, <subreleaseName>, {<optionals>});

ectool

ectool addSubrelease projectName,  releaseName,  subreleaseName, [optionals]

completeRelease

Completes the release.

Arguments

Argument Name Type Description

projectName

String

The name of the project.

releaseId

UUID

The ID of the release.

releaseName

String

The name of the release.

Positional arguments

None.

Usage

ec-perl

$cmdr->completeRelease({<optionals>});

ectool

ectool completeRelease [optionals]

createRelease

Creates a new release for a project.

  • If the pipelineName and pipelineProjectName arguments are not provided, a new release-scoped pipeline is created under the new release.

  • If the pipelineName and pipelineProjectName arguments are provided, the pipeline is cloned to a new pipeline under the new release.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

releaseName

String

(Required) The name of the release.

actualParameters

Map

Values for formal parameters that are defined in the release pipeline. If the release is started using the startRelease command and the pipelineParameters values are not specified, the actualParameters values are used. Therefore, if issuing the createRelease or modifyRelease commands and all required parameter values are provided, the release can be started using the startRelease command, without having to specify the pipelineParameters values again.

description

String

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

disableMultipleActiveRuns

Boolean

Boolean flag showing if option to run multiple pipelines simultaneously is disabled.

disablePipelineRestart

Boolean

True to disable restart release pipeline.

overrideWorkspace

Boolean

If true and workspaceName is not null, then all tasks use pipeline’s workspace.

pipelineName

String

The name of the pipeline.

pipelineProjectName

String

The name of the project containing specified pipeline. If not specified, it is defaulted to the release project name.

pipelineWorkspaceName

String

The name of the workspace used by pipeline.

plannedEndDate

String

The date when this release is expected to end (for example, 2006-05-15).

plannedStartDate

String

The date when this release is expected to begin (for example, 2006-05-15).

timeZone

String

The time zone to use when interpreting times.

Positional arguments

projectName, releaseName

Usage

ec-perl

$cmdr->createRelease(<projectName>, <releaseName>, {<optionals>});

ectool

ectool createRelease projectName,  releaseName, [optionals]

deleteRelease

Deletes a release.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

releaseName

String

(Required) The name of the release.

foreground

Boolean

True to delete the object in the foreground. The default is to delete the object in the background.

Positional arguments

projectName, releaseName

Usage

ec-perl

$cmdr->deleteRelease(<projectName>, <releaseName>, {<optionals>});

ectool

ectool deleteRelease projectName,  releaseName, [optionals]

getRelease

Retrieves a release by name.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

releaseName

String

(Required) The name of the release.

releaseFlowRuntimeMappings

Map

Map of releaseId and flowRuntimeId.

Positional arguments

projectName, releaseName

Usage

ec-perl

$cmdr->getRelease(<projectName>, <releaseName>, {<optionals>});

ectool

ectool getRelease projectName,  releaseName, [optionals]

getReleases

Retrieves all releases.

You must specify the projectName argument for backward compatibility with CloudBees CD/RO 6.2 and earlier.

Arguments

Argument Name Type Description

projectName

String

(Required) Name for the project; must be unique among all projects.

excludeRuntimeDetails

Boolean

True to exclude runtime details for each release.

filters

Collection

A list of zero or more filter criteria definitions used to define objects to find.

firstResult

Integer

Result pagination: the first row to return.

maxResults

Integer

Result pagination: the number of rows to return.

releaseFlowRuntimeMappings

Map

Map of releaseId and flowRuntimeId.

sortKey

String

How to sort the results.

sortOrder

SortOrder

Specifies the order to sort the results.

viewName

String

The name of the view.

Positional arguments

projectName

Usage

ec-perl

$cmdr->getReleases(<projectName>, {<optionals>});

ectool

ectool getReleases projectName, [optionals]

getReleaseTimelineDetails

Retrieves planned versus actual time details for a release.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

releaseName

String

(Required) The name of the release.

Positional arguments

projectName, releaseName

Usage

ec-perl

$cmdr->getReleaseTimelineDetails(<projectName>, <releaseName>);

ectool

ectool getReleaseTimelineDetails projectName,  releaseName

getSubrelease

Retrieves a subrelease for a given release.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

releaseName

String

(Required) The name of the release.

subreleaseName

String

(Required) The name of the subrelease.

subreleaseProject

String

The name of the subrelease project.

Positional arguments

projectName, releaseName, subreleaseName

Usage

ec-perl

$cmdr->getSubrelease(<projectName>, <releaseName>, <subreleaseName>, {<optionals>});

ectool

ectool getSubrelease projectName,  releaseName,  subreleaseName, [optionals]

getSubreleases

Retrieves subreleases for a given release.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

releaseName

String

(Required) The name of the release.

Positional arguments

projectName, releaseName

Usage

ec-perl

$cmdr->getSubreleases(<projectName>, <releaseName>);

ectool

ectool getSubreleases projectName,  releaseName

modifyRelease

Modifies an existing release. When the pipelineName and pipelineProjectName arguments are provided, the existing pipeline associated with the release is deleted, and the resolved pipeline is cloned to a new pipeline under the new release.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

releaseName

String

(Required) The name of the release.

actualParameters

Map

Values for formal parameters that are defined in the release pipeline. If the release is started using the startRelease command and the pipelineParameters values are not specified, the actualParameters values are used. Therefore, if issuing the createRelease or modifyRelease commands and all required parameter values are provided, the release can be started using the startRelease command, without having to specify the pipelineParameters values again.

clearActualParameters

Boolean

True if the task should remove all actual parameters.

description

String

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

disableMultipleActiveRuns

Boolean

Boolean flag showing if option to run multiple pipelines simultaneously is disabled.

disablePipelineRestart

Boolean

True to disable restart release pipeline.

newName

String

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

overrideWorkspace

Boolean

If true and workspaceName is not null, then all tasks use pipeline’s workspace.

pipelineName

String

The name of the pipeline.

pipelineProjectName

String

The name of the project containing specified pipeline. If not specified, it is defaulted to the release project name.

pipelineWorkspaceName

String

The name of the workspace used by pipeline.

plannedEndDate

String

The date when this release is expected to end (for example, 2006-05-15).

plannedStartDate

String

The date when this release is expected to begin (for example, 2006-05-15).

timeZone

String

The time zone to use when interpreting times.

Positional arguments

projectName, releaseName

Usage

ec-perl

$cmdr->modifyRelease(<projectName>, <releaseName>, {<optionals>});

ectool

ectool modifyRelease projectName,  releaseName, [optionals]

removeSubrelease

Removes a subrelease from a release.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

releaseName

String

(Required) The name of the release.

subreleaseName

String

(Required) The name of the subrelease.

subreleaseProject

String

The name of the subrelease project.

Positional arguments

projectName, releaseName, subreleaseName

Usage

ec-perl

$cmdr->removeSubrelease(<projectName>, <releaseName>, <subreleaseName>, {<optionals>});

ectool

ectool removeSubrelease projectName,  releaseName,  subreleaseName, [optionals]

startRelease

Starts a release. If the release pipeline configures disableMultipleActiveRuns= true, only one active run of this release pipeline is allowed at a time and attempts to start more than one results in an exception.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

releaseName

String

(Required) The name of the release.

credentialReferenceParameters

Map

List of credential parameters with references to existing credentials as parameter values. If the parameter value is a property reference then the credential would be resolved at runtime.

credentials

Collection

Credentials to be used in the state.

parsedWebhookData

String

JSON with parsed webhook data to be set on a pipeline/release/procedure run.

pipelineParameters

Map

The list of pipeline parameters.

priority

JobPriority

The priority of jobs launched by the release.

scheduleName

String

Name for the schedule; must be unique among all schedules for the project.

stagesToRun

Collection

One or more stages to run in a pipeline associated with the release.

startingStage

String

The name of the starting stage.

startingTask

String

The name of the starting task.

startingTaskStage

String

The name of the stage containing starting task.

webhookData

String

The webhook data to be set on the pipeline/release/procedure run.

webhookHeaders

String

The webhook headers in JSON format to be set on the pipeline/release/procedure run.

Positional arguments

projectName, releaseName

Usage

ec-perl

$cmdr->startRelease(<projectName>, <releaseName>, {<optionals>});

ectool

ectool startRelease projectName,  releaseName, [optionals]