modifyStage

Back to index

Summary

Modifies an existing stage.
projectName
Stringrequired
The name for the project that must be unique among all projects.
stageName
Stringrequired
The name of the stage.
afterStage
Stringoptional
If specified, the stage will be placed after the named stage.
beforeStage
Stringoptional
If specified, the stage will be placed before the named stage.
colorCode
Stringoptional
The hexadecimal value of the color to be used with an entity.
completed
Booleanoptional
Set true to complete and false to incomplete a stage with manual completion type. A stage with auto completion type ignores this argument.
completionType
Stringoptional
The stage completion type: auto (be default) or manual.
Possible values: "auto", "manual"
condition
Stringoptional
A fixed text or text embedding property references that is evaluated into a logical TRUE or FALSE. An empty string, a 0 or false is interpreted as FALSE. Any other result string is interpreted as TRUE.
description
Stringoptional
Comment text describing this object that is not interpreted at all by CloudBees CD/RO.
duration
Stringoptional
Duration in minutes for which the stage or task should relative to plannedStartDate.
incompletePostStages
Booleanoptional
If True, then in case of specified stage incompletion, all post stages are not completed too.
newName
Stringoptional
The new name for an existing object that is being renamed.
parallelToPrevious
Booleanoptional
If TRUE, the flow state will be run in parallel to the previous flow state.
pipelineName
Stringoptional
The name of the pipeline.
plannedEndDate
Stringoptional
The date when this stage or task is expected to end.
plannedStartDate
Stringoptional
The date when this stage or task is expected to start.
precondition
Stringoptional
A fixed text or text embedding property references that is evaluated into a logical TRUE or FALSE. An empty string, a 0 or false is interpreted as FALSE. Any other result string is interpreted as TRUE.
releaseName
Stringoptional
The name of the release.
resourceName
Stringoptional
The name of the default resource for this stage.
timeZone
Stringoptional
The time zone to use when interpreting times.
waitForPlannedStartDate
Booleanoptional
True to enable waiting for planned start date.

Usage

Perl

$cmdr->modifyStage( "test-projectName", # projectName "test-stageName" # stageName # optionals );

ectool

ectool modifyStage \ "test-projectName" `# projectName` \ "test-stageName" `# stageName` \ # optionals

Examples

Perl

To modify the name of the stage, enter:

$cmdr->modifyStage("Default", "PROD", {newName => "PROD 2"});

To modify the Wait until condition (precondition) so that the "Automated Tests" stage is completed before running the "UAT demo" stage, enter:

$cmdr->modifyStage("Default", "UAT demo", {precondition => "$[/myPipelineRuntime/autoTestCompleted]"});

To modify the Run if condition (run condition) that the name of the next stage after the "Preflight" stage is "UATdemo", enter:

$cmdr->modifyStage("Default", "Preflight", {condition => "$[/javascript (myPipelineRuntime.pipelineName == myPipelineRuntime.UATdemo)]"});

ectool

To modify the name of the stage, enter:

ectool modifyStage "Default" "PROD" --newName "PROD 2"

To modify the Wait until condition (precondition) so that the "Automated Tests" stage is completed before running the "UAT demo" stage, enter:

ectool modifyStage "Default" "UAT demo" --precondition "$[/myPipelineRuntime/autoTestCompleted]"

To modify the Run if condition (run condition) that the name of the next stage the "Preflights" stage is "UATdemo", enter:

ectool modifyStage "Default" "Preflight" --condition => "$[/javascript (myPipelineRuntime.pipelineName == myPipelineRuntime.UATdemo)]"