KBEC-00349 - How to get the valid options for a given data type

Article ID:360033190091
1 minute readKnowledge base

Summary:

This article discusses how to get the valid options for a given data type.

Solution:

When you want to use the CloudBees CD (CloudBees Flow)/ElectricCommander API or DSL by referring to the online help for specific API call, you may find for some arguments the document provide a data type but you don’t know what are valid options. For example, starting from CloudBees CD (CloudBees Flow) 6.4, an enhanced error handling option in the pipeline Stage task was introduced, Gate approvals and Deployer which is specified via "errorHandling" argument as documented in createTask.

Usually you can get such valid options via "ectool --help". For example in this case, you can find it below.

>ectool createTask --help
>Usage: createTask
 [--actualParameter = [= ...]]
 [--advancedMode <0|1|true|false>]
 [--afterTask ]
 [--approvers approver1 approver2 ...]
 [--beforeTask ]
 [--description ]
 [--enabled <0|1|true|false>]
 [--environmentName ]
 [--environmentProjectName ]
 [--environmentTemplateName ]
 [--environmentTemplateProjectName ]
 [--errorHandling ]
 [--gateType ]
 [--instruction ]
 [--keepOnError <0|1|true|false>]
 [--notificationTemplate ]
 [--pipelineName ]
 [--skippable <0|1|true|false>]
 [--snapshotName ]
 [--stageName ]
 [--startTime ]
 [--subapplication ]
 [--subpluginKey ]
 [--subprocedure ]
 [--subprocess ]
 [--subproject ]
 [--subworkflowDefinition ]
 [--subworkflowStartingState ]
 [--taskProcessType ]
 [--taskType ]
 [--tierResourceCount = [= ...]]
 [--workspaceName ]

Then you can see the valid options for "CloudBees CD (CloudBees Flow) ErrorHandling" are continueOnError and "stopOnError" via below line.

--errorHandling

Applies to:

  • Production version: All

  • OS: All