Release

6 minute readReference

addSubrelease

Adds a subrelease to a given release.

Arguments

Argument Name Type Description

projectName

String

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

releaseName

String

The name of the release. (Required)

subreleaseName

String

The name of the subrelease. (Required)

subreleaseProject

String

The name of the subrelease project.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.addSubrelease( projectName: 'test-projectName', releaseName: 'test-releaseName', subreleaseName: 'test-subreleaseName' /* optional arguments */)

attachPipelineRun

Adds a pipeline run to a release with a status of running or planning; pipeline runs cannot be attached to completed releases.

Arguments

Argument Name Type Description

projectName

String

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

releaseName

String

The name of the release.

flowRuntimeId

String

The ID of the pipeline run to attach.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.attachPipelineRun( projectName: 'test-projectName', /* optional arguments */)

completeRelease

Completes the release.

Arguments

Argument Name Type Description

projectName

String

The name of the project.

releaseName

String

The name of the release.

releaseId

String

The ID of the release.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.completeRelease( /* optional arguments */)

createRelease

Creates a new release for a project.

Arguments

Argument Name Type Description

projectName

String

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

releaseName

String

The name of the release. (Required)

actualParameters

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, 2023-05-15).

plannedStartDate

String

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

timeZone

String

The time zone to use when interpreting times.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.createRelease( projectName: 'test-projectName', releaseName: 'test-releaseName' /* optional arguments */)

deleteRelease

Deletes a release.

Arguments

Argument Name Type Description

projectName

String

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

releaseName

String

The name of the release. (Required)

foreground

Boolean

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

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.deleteRelease( projectName: 'test-projectName', releaseName: 'test-releaseName' /* optional arguments */)

detachPipelineRun

Detaches a pipeline run from the specified release.

Arguments

Argument Name Type Description

projectName

String

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

releaseName

String

The name of the release.

flowRuntimeId

String

The ID of the pipeline run to attach.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.detachPipelineRun( projectName: 'test-projectName', /* optional arguments */)

getAttachedPipelineRuns

Fetches all attached runs for the specified release.

Arguments

Argument Name Type Description

projectName

String

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

releaseName

String

The name of the release.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getAttachedPipelineRuns( projectName: 'test-projectName', )

getRelease

Retrieves a release by name.

Arguments

Argument Name Type Description

releaseName

String

The name of the release. (Required)

projectName

String

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

releaseFlowRuntimeMappings

array

Map of releaseId and flowRuntimeId.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getRelease( releaseName: 'test-releaseName', projectName: 'test-projectName' /* optional arguments */)

getReleaseInventory

Retrieves the artifact inventory created in a release.

Arguments

Argument Name Type Description

releaseName

String

The name of the release. (Required)

projectName

String

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

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getReleaseInventory( releaseName: 'test-releaseName', projectName: 'test-projectName')

getReleases

Retrieve all releases.

Arguments

Argument Name Type Description

excludeRuntimeDetails

Boolean

True to exclude runtime details for each release.

filters

Filter array

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.

projectName

String

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

releaseFlowRuntimeMappings

array

Map of releaseId and flowRuntimeId.

sortKey

String

How to sort the results.

sortOrder

String

Specifies the order to sort the results.

viewName

String

The name of the view.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getReleases( /* optional arguments */)

getSubrelease

Retrieves a subrelease for a given release.

Arguments

Argument Name Type Description

projectName

String

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

releaseName

String

The name of the release. (Required)

subreleaseName

String

The name of the subrelease. (Required)

subreleaseProject

String

The name of the subrelease project.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getSubrelease( projectName: 'test-projectName', releaseName: 'test-releaseName', subreleaseName: 'test-subreleaseName' /* optional arguments */)

getSubreleases

Retrieves subreleases for a given release.

Arguments

Argument Name Type Description

projectName

String

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

releaseName

String

The name of the release. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getSubreleases( projectName: 'test-projectName', releaseName: 'test-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

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

releaseName

String

The name of the release. (Required)

actualParameters

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, 2023-05-15).

plannedStartDate

String

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

timeZone

String

The time zone to use when interpreting times.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.modifyRelease( projectName: 'test-projectName', releaseName: 'test-releaseName' /* optional arguments */)

removeSubrelease

Removes a subrelease from a release.

Arguments

Argument Name Type Description

projectName

String

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

releaseName

String

The name of the release. (Required)

subreleaseName

String

The name of the subrelease. (Required)

subreleaseProject

String

The name of the subrelease project.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.removeSubrelease( projectName: 'test-projectName', releaseName: 'test-releaseName', subreleaseName: 'test-subreleaseName' /* optional arguments */)

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

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

releaseName

String

The name of the release. (Required)

credentialReferenceParameters

array

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

Credential array

Credentials to be used in the state.

parsedWebhookData

String

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

pipelineParameters

The list of pipeline parameters.

priority

String

The priority of jobs launched by the release.

scheduleName

String

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

stagesToRun

String array

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.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.startRelease( projectName: 'test-projectName', releaseName: 'test-releaseName' /* optional arguments */)