Environment

3 minute readReference

createEnvironment

Creates a new environment.

Arguments

Argument Name Type Description

projectName

String

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

environmentName

String

The name of the environment. (Required)

applicationName

String

Create environment from the specified application.

applicationProjectName

String

The application’s project name.

description

String

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

environmentEnabled

Boolean

True to enable the environment.

reservationRequired

Boolean

True to allow run using reservation only.

rollingDeployEnabled

Boolean

True to enable support for rolling deploy on this environment.

rollingDeployType

String

The type of rolling deploy type supported by the environment.

Usage

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

deleteEnvironment

Deletes an environment.

Arguments

Argument Name Type Description

projectName

String

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

environmentName

String

The name of the environment. (Required)

Usage

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

deleteRollingDeployPhase

Deletes the rolling deploy phase associated with an environment.

Arguments

Argument Name Type Description

projectName

String

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

rollingDeployPhaseName

String

The name of the rolling deploy phase. (Required)

environmentName

String

The name of the environment.

Usage

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

getEnvironment

Retrieves an environment by name.

Arguments

Argument Name Type Description

projectName

String

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

environmentName

String

The name of the environment. (Required)

Usage

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

getEnvironmentDeployments

Retrieves environment deployments for the specified environment.

Arguments

Argument Name Type Description

projectName

String

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

environmentName

String

The name of the environment. (Required)

Usage

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

getEnvironments

Retrieves all environments in a project.

Arguments

Argument Name Type Description

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.getEnvironments( projectName: 'test-projectName')

getProvisionedEnvironments

Retrieves provisioned environments.

Arguments

Argument Name Type Description

flowRuntimeId

String

The ID of the flow runtime.

jobId

String

The primary key of the job, or the name of the job.

stageName

String

The name of the stage.

Usage

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

modifyEnvironment

Modifies an environment.

Arguments

Argument Name Type Description

projectName

String

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

environmentName

String

The name of the environment. (Required)

description

String

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

environmentEnabled

Boolean

True to enable the environment.

newName

String

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

reservationRequired

Boolean

True to allow run using reservation only.

rollingDeployEnabled

Boolean

True to enable support for rolling deploy on this environment.

rollingDeployType

String

The type of rolling deploy type supported by the environment.

Usage

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

tearDownEnvironment

Used to get rid of an environment that is no longer needed, and tear down associated dynamic resources.

Arguments

Argument Name Type Description

projectName

String

Name for the project containing the environment. (Required)

environmentName

String

The name of the environment. (Required)

Usage

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