createStage

Back to index

Summary

Creates a new stage in a pipeline for a project.
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.
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->createStage( "test-projectName", # projectName "test-stageName" # stageName # optionals );

ectool

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

Examples

Perl

To specify that the Preflight stage run after the Automated Tests stage, enter:

$cmdr->createStage("Default", "Preflight", {afterStage => "Automated Tests"});

To set the Wait until condition (precondition) that the Automated Tests stage is completed before running the Preflight stage, enter:

$cmdr->createStage("Default", "Preflight", {precondition => "$[/myPipelineRuntime/autoTestCompleted]"});

To set the Run if condition (run condition) that the name of the next stage is Preflight, enter:

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

ectool

To specify that the Preflight stage run after the Automated Tests stage, enter:

ectool createStage "Default" "Preflight" --afterStage "Automated Test"

To set the Wait until condition (precondition) that the Automated Tests stage is completed before running the Preflight stage, enter:

ectool createStage "Default" "Preflight" --precondition "$[/myPipelineRuntime/autoTestCompleted]"

To set the Run if condition (run condition) that the name of the next stage is Preflight, enter:

ectool createStage "Default" "Preflight" --condition "$[/javascript (myPipelineRuntime.pipelineName == myPipeline.Preflight)]"