Rolling Deploy

4 minute readReference

createRollingDeployPhase

Adds a rolling deploy phase to the specified environment.

You must specify the projectName and rollingDeployPhaseName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument Type: String

rollingDeployPhaseName

Name of the rolling deploy phase.

Argument Type: String

description

(Optional) Comment text describing this object. It is not interpreted by CloudBees CD/RO .

Argument Type: String

environmentName

(Optional) Name of the environment.

Argument Type: String

orderIndex

(Optional) Order of the phases at runtime, starting from 1.

Argument Type: Integer

phaseExpression

(Optional) This is fixed text or text embedding a property reference that is evaluated to TRUE or FALSE. An empty string, a \"0\" or \"false\" is interpreted as FALSE. Any other result string is interpreted as TRUE.

Argument Type: String

rollingDeployPhaseType

(Optional) Type of rolling deploy phase. Valid values are tagged and untagged.

Argument Type: RollingDeployPhaseType

Positional arguments

projectName and rollingDeployPhaseName

Response

Returns a rolling-deploy phase object.

ec-perl

syntax: $<object>->createRollingDeployPhase(<projectName>, <rollingDeployPhaseName>, {<optionals>});

Example

$ec->createRollingDeployPhase('Default', 'Test Phase', {environmentName => 'QA'});

ectool

syntax: ectool createRollingDeployPhase <projectName> <rollingDeployPhaseName> [optionals]

Example

ectool createRollingDeployPhase 'Default' 'Test Phase' --environmentName 'QA'

deleteRollingDeployPhase

Deletes the rolling deploy phase associated with an environment.

You must specify the projectName and rollingDeployPhaseName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument Type: String

rollingDeployPhaseName

Name of the rolling deploy phase.

Argument Type: String

environmentName

(Optional) Name of the environment.

Argument Type: String

Positional arguments

projectName and rollingDeployPhaseName

Response

None or a status OK message.

ec-perl

Syntax:

$<object>->deleteRollingDeployPhase(<projectName>, <rollingDeployPhaseName>, {<optionals>});

Example:

$ec->deleteRollingDeployPhase('Default', 'Test Phase', {environmentName => 'QA'});

ectool

Syntax:

ectool deleteRollingDeployPhase <projectName> <rollingDeployPhaseName> [optionals]

Example:

ectool deleteRollingDeployPhase 'Default' 'Test Phase' --environmentName 'QA'

getRollingDeployPhase

Retrieves the rolling deploy phase associated with an environment.

You must specify the projectName and rollingDeployPhaseName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument Type: String

rollingDeployPhaseName

Name of the rolling deploy phase.

Argument Type: String

environmentName

(Optional) Name of the environment.

Argument Type: String

environmentTierName

(Optional) Name for the environment tier.

Argument Type: String

includeResourceCount

(Optional) < Boolean flag— 0|1|true|false >

If this is set to true or 1, the response includes the resource count for the rolling deploy phase.

Argument Type: Boolean

Positional arguments

projectName and rollingDeployPhaseName

Response

Returns a rolling deploy phase object.

ec-perl

syntax: $<object>->getRollingDeployPhase(<projectName>, <rollingDeployPhaseName>, {<optionals>});

Example

$ec->getRollingDeployPhase('Default', 'Test Phase', {environmentName => 'QA', includeResourceCount => true});

ectool

syntax: ectool getRollingDeployPhase <projectName> <rollingDeployPhaseName> [optionals]

Example

ectool getRollingDeployPhase 'Default' 'Test Phase' --environmentName 'QA' --includeResourceCount true

getRollingDeployPhases

Retrieves all the rolling deploy phases associated with an environment.

You must specify the projectName.

Arguments Descriptions

applicationName

(Optional) Name for the application.

Argument Type: String

applicationProjectName

(Optional) Name for the application project.

Argument Type: String

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument Type: String

environmentName

(Optional) Name of the environment.

Argument Type: String

environmentTierName

(Optional) Name for the environment tier.

Argument Type: String

includeResourceCount

(Optional) < Boolean flag— 0|1|true|false >

If this is set to true or 1, the response includes the resource count for the rolling deploy phase.

Argument Type: Boolean

Positional arguments

projectName

Response

Returns all the rolling deploy phase objects associated with an environment.

ec-perl

syntax: $<object>->getRollingDeployPhases(<projectName>, {<optionals>});

Example

$ec->getRollingDeployPhases('Default', {environmentName => 'QA', includeResourceCount => true});

ectool

syntax: ectool getRollingDeployPhases <projectName> [optionals]

Example

ectool getRollingDeployPhases 'Default' --environmentName 'QA' --includeResourceCount true

modifyRollingDeployPhase

Modifies the rolling deploy phase associated with an environment.

You must specify the projectName and rollingDeployPhaseName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument Type: String

rollingDeployPhaseName

Name of the rolling deploy phase.

Argument Type: String

description

(Optional) Comment text describing this object. It is not interpreted by CloudBees CD/RO .

Argument Type: String

environmentName

(Optional) Name of the environment.

Argument Type: String

newName

(Optional) New name of the rolling deploy phase.

Argument Type: String

orderIndex

(Optional) Order of the phases at runtime, starting from 1.

Argument Type: Integer

phaseExpression

(Optional) This is fixed text or text embedding a property reference that is evaluated to TRUE or FALSE. An empty string, a \"0\" or \"false\" is interpreted as FALSE. Any other result string is interpreted as TRUE.

Argument Type: String

rollingDeployPhaseType

(Optional) Type of rolling deploy phase. Valid values are tagged and untagged.

Argument Type: RollingDeployPhaseType

Positional arguments

projectName and rollingDeployPhaseName

Response

Returns a modified rolling deploy phase object.

ec-perl

syntax: $<object>->modifyRollingDeployPhase(<projectName>, <rollingDeployPhaseName>, {<optionals>});

Example

$ec->modifyRollingDeployPhase('Default', 'Test Phase', {newName => 'QA Test Phase', orderIndex => 3});

ectool

syntax: ectool modifyRollingDeployPhase <projectName> <rollingDeployPhaseName> [optionals]

Example

ectool modifyRollingDeployPhase 'Default' 'Test Phase' --newName 'QA Test Phase' --orderIndex 3

setTierResourcePhase

Maps a resource to a rolling deploy phase.

Required arguments

projectName

Description: include::partial$name-for-the-project.adoc[]

Type: String

environmentName

Description: The name of the environment.

Type: String

environmentTierName

Description: Name for the environment tier that must be unique among all tiers for the environment.

Type: String

Optional arguments

resourceNames

Description: A list of resources to be mapped to a rolling deploy phase.

Type: Collection

resourcePhaseMappings

Description: A map of resources to rolling deploy phases.

Type: Map

resourcePoolNames

Description: A list of resource pools to be mapped to a rolling deploy phase.

Type: Collection

resourcePoolPhaseMappings

Description: A map of resource pools to rolling deploy phases.

Type: Map

rollingDeployPhaseName

Description: Name for the rolling deploy phase to be associated with resources or resource pools.

Type: String

Response

Returns zero or more mappings of resources or resource pools to rolling deploy phases.

ec-perl

Syntax:

$<object>->setTierResourcePhase(<projectName>, <environmentName>, <environmentTierName>, {<optionals>});

Examples:

To map three resources to a rolling deploy phase:

$ec->setTierResourcePhase("Default", "PROD", "Web servers", {resourceNames => Webserver-resource1 Webserver-resource2 Webserver-resource3, rollingDeployPhaseName => Phase1});

To map three resource pools to a rolling deploy phase:

$ec->setTierResourcePhase("Default", "PROD", "Web servers", {resourceNames => Webserver-pool1 Webserver-pool2 Webserver-pool3, rollingDeployPhaseName => Phase1});

To map specific resources to specific rolling deploy phases:

$ec->setTierResourcePhase("Default", "PROD", "Web servers", {resourcePhaseMappings => Webserver-resource1=Phase1 Webserver-resource2=Phase2 Webserver-resource3=Phase1});

To map specific resource pools to specific rolling deploy phases:

$ec->setTierResourcePhase("Default", "PROD", "Web servers", {resourcePhaseMappings => Webserver-pool1=Phase1 Webserver-pool2=Phase2 Webserver-pool3=Phase1});

ectool

Syntax:

ectool setTierResourcePhase <projectName> <environmentName> <environmentTierName> [optionals]

Examples:

To map three resources to a rolling deploy phase:

ectool setTierResourcePhase "Default" "PROD" "Web servers" --resourceNames Webserver-resource1 Webserver-resource2 Webserver-resource3 --rollingDeployPhaseName Phase1

To map three resource pools to a rolling deploy phase:

ectool setTierResourcePhase "Default" "PROD" "Web servers" --resourcePoolNames Webserver-pool1 Webserver-pool2 Webserver-Pool3 --rollingDeployPhaseName Phase1

To map specific resources to specific rolling deploy phases:

ectool setTierResourcePhase "Default" "PROD" "Web servers" --resourcePhaseMappings Webserver-resource1=Phase1 Webserver-resource2=Phase2 Webserver-resource3=Phase1

To map specific resource pools to specific rolling deploy phases:

ectool setTierResourcePhase "Default" "PROD" "Web servers" --resourcePhaseMappings Webserver-pool1=Phase1 Webserver-pool2=Phase2 Webserver-pool3=Phase1