Back to index
Summary
Creates a new stage in a pipeline for a project.projectNameStringrequiredThe name for the project that must be unique among all projects. stageNameStringrequiredThe name of the stage. afterStageStringoptionalIf specified, the stage will be placed after the named stage. beforeStageStringoptionalIf specified, the stage will be placed before the named stage. colorCodeStringoptionalThe hexadecimal value of the color to be used with an entity. completedBooleanoptionalSet true to complete and false to incomplete a stage with manual completion type. A stage with auto completion type ignores this argument. completionTypeStringoptionalThe stage completion type: auto (be default) or manual. Possible values: "auto" , "manual" conditionStringoptionalA 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.descriptionStringoptionalComment text describing this object that is not interpreted at all by CloudBees CD/RO. durationStringoptionalDuration in minutes for which the stage or task should relative to plannedStartDate .incompletePostStagesBooleanoptionalIf True, then in case of specified stage incompletion, all post stages are not completed too. parallelToPreviousBooleanoptionalIf TRUE, the flow state will be run in parallel to the previous flow state. pipelineNameStringoptionalThe name of the pipeline. plannedEndDateStringoptionalThe date when this stage or task is expected to end. plannedStartDateStringoptionalThe date when this stage or task is expected to start. preconditionStringoptionalA 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.releaseNameStringoptionalThe name of the release. resourceNameStringoptionalThe name of the default resource for this stage. timeZoneStringoptionalThe time zone to use when interpreting times. waitForPlannedStartDateBooleanoptionalTrue 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)]"