Back to index
Summary
Creates a new task for a task container.projectNameStringrequiredThe name for the project that must be unique among all projects. pipelineNameStringoptionalThe name of the pipeline. stageNameStringoptionalName of the stage to which this task belongs to. taskNameStringrequiredThe name of the task. actionLabelTextStringoptionalThe JSON derived action label text. advancedModeBooleanoptionalTrue to enable advanced mode so as to templatize snapshotName. afterLastRetryStringoptionalSpecify continue or stop pipeline execution after last unsuccessful retry or a task. Possible values: "continueOnError" , "stopOnError" afterTaskStringoptionalIf specified, the task will be placed after the named task. allowOutOfOrderRunBooleanoptionalIf True, allow to run a task out of order. allowSkipBooleanoptionalWhen enabled, manual task or gate rule can be skipped. alwaysRunBooleanoptionalTrue means this task will run even if preceding tasks fail in a way that aborts the pipeline. applicationNameStringoptionalThe name of the application used in sub task. applicationProjectNameStringoptionalName for the project to which the application belongs to. applicationVersionStringoptionalApplication version to be deployed by a sub task. approversArray<Unknown>optionalA list of task approvers who receive the notification. artifactsStringoptionalIf specified, the task will be placed before the named task. beforeTaskStringoptionalIf specified, the task will be placed before the named task. ciConfigurationNameStringoptionalThe CI configuration name. ciControllerFolderStringoptionalPath to the folder on the CI controller referenced by the CloudBees Operation Center that contains the specified CI controller. Must be in format folder1/folder2/folder3/... . ciControllerNameStringoptionaldeprecatedName of the CI controller. Deprecated in favor of ciEndpoint argument. ciEndpointStringoptionalEndpoint value configured for CI controller. ciJobBranchNameStringoptionalName of the CI Job Branch. ciJobFolderStringoptionalPath to the folder on the CI server referenced by the CI configuration that contains the specified CI job. Must be in format folder1/folder2/folder3/... . ciJobNameStringoptionalName of the CI job. commandStringoptionalCommand or script to execute for the task. 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.customLabelStringoptionalCustom display name for sub pipelines or releases. deployerExpressionStringoptionalA 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.deployerRunTypeStringoptionalThe type of the deployer run for deployer type of task. If parallel then all applications are deployed in parallel. Possible values: "parallel" , "serial" descriptionStringoptionalComment text describing this object that is not interpreted at all by CloudBees CD/RO. disableFailureBooleanoptionalTrue means a manual task cannot be failed. durationStringoptionalDuration in minutes for which the stage or task should relative to plannedStartDate .emailConfigNameStringoptionalThe name of the email configuration. enabledBooleanoptionalTrue to enable the task. environmentNameStringoptionalEnvironment name to create from template. environmentProjectNameStringoptionalName for the project to which the environment or environment template belongs to. environmentTemplateNameStringoptionalEnvironment template name. environmentTemplateProjectNameStringoptionalName for the project to which the environment template belongs to. errorHandlingStringoptionalSpecifies error handling for this task. Possible values: "continueOnError" , "retryOnError" , "stopOnError" externalApplicationIdStringoptionalpreviewUnique application identifier maintained by an external system. Used to identify applications deployed by CloudBees CD/RO pipelines within CloudBees Compliance. firstTaskBooleanoptionalTrue to make a task first in a stage. gateConditionStringoptionalA 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.gateTypeStringoptionalThe type of the gate. Possible values: "POST" , "PRE" groupNameStringoptionalThe name of the group of task. groupRunTypeStringoptionalThe type of the sub task run for a group task. If serial then all tasks are run in serial, otherwise - in parallel (by default). Possible values: "parallel" , "serial" hookActualParametersArray<HookActualParameter>optionalThe hook actual parameters passed to an invoked subprocedure. hookCommandStringoptionalThe command for the hook procedure to execute as the last step. hookProcedureNameStringoptionalThe name of the hook procedure to execute as the last step. hookProjectNameStringoptionalName of the project, corresponding to the hook procedure name, to execute as the last step. hookShellStringoptionalThe shell for the hook command to execute as the last step. hookStageSummaryParametersStringoptionalJSON representation of hook stage summary parameters and labels. insertRollingDeployManualStepBooleanoptionalTrue to indicate a manual step to inject after each phase or batch. instructionStringoptionalInstruction associated with the task. keepOnErrorBooleanoptionalTrue to keep environment on error (default is false). notificationEnabledBooleanoptionalTrue means this email notification is enabled, false otherwise. notificationTemplateStringoptionalString containing email formatting instructions for generating notifications. outOfOrderRunAssigneesArray<Unknown>optionalA list of users who can run a task out of order. parallelToPreviousBooleanoptionalIf TRUE, the flow state will be run in parallel to the previous flow state. plannedEndDateStringoptionalThe date when this stage or task is expected to end. plannedStartDateStringoptionalThe date when this stage or task is expected to start. postpStringoptionalThis command runs in parallel with the main command for the task; it analyzes the log for the step and collects diagnostic information. 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.releaseManifestStringoptionalpreviewComponents (artifacts or container images) that are being deployed in the release payload, specified in JSON format. releaseNameStringoptionalThe name of the release. requiredApprovalsCountStringoptionalThe number of users from a group that should approve the task before it's considered as finally approved. resourceNameStringoptionalThe name of the default resource for this task. retryCountStringoptionalIf the retry is auto, specify the maximum number of times retry should occur. retryIntervalStringoptionalIf the retry is auto, specify the number of seconds to wait until the next retry should occur. retryTypeStringoptionalType of retry when process step or task fails. Is one of auto or manual .Possible values: "auto" , "manual" rollingDeployEnabledBooleanoptionalPerform rolling deployment. rollingDeployManualStepAssigneesArray<Unknown>optionalA list of assignees who receive the notification when rolling deploy iteration completes. rollingDeployManualStepConditionStringoptionalDefines run condition on manual step created during rolling deployment. Possible values: "always" , "failure" , "success" rollingDeployPhasesArray<Unknown>optionalOne or more rolling deploy phases to be used for deployment. rolloutApproversArray<Unknown>optionalA list of rollout approvers. rolloutNotificationEnabledBooleanoptionalRollout notification enabled (default is false). shellStringoptionalThe shell or command-line program to run the command block in. skippableBooleanoptionalTrue if a task is skippable. snapshotNameStringoptionalName of the snapshot associated with the application. stageSummaryParametersStringoptionalJSON representation of stage summary parameters and labels. stagesToRunArray<Unknown>optionalOne or more stages to run in a pipeline. startTimeStringoptionalThe time of day to begin invoking this task (24-hour clock, for example, 17:00). startingStageStringoptionalThe name of the starting stage. subErrorHandlingStringoptionalThe impact of invoking pipeline run when sub-pipeline fails. Possible values: "continueOnError" , "stopOnError" subTaskTypeStringoptionalThe type of the sub task. Possible values: "DEPLOY" , "NONE" , "UNDEPLOY" subapplicationStringoptionalThe name of the application that owns the subprocess. subpipelineStringoptionalIf referencing a pipeline, the name of the pipeline. subpluginKeyStringoptionalIf referencing a procedure, the name of the procedure's pluginKey. subprocedureStringoptionalIf referencing a procedure, the name of the procedure. subprocessStringoptionalThe name of the process. subprojectStringoptionalIf referencing a procedure, the name of the procedure's project. subreleaseStringoptionalIf referencing a release, the name of the release. subreleasePipelineStringoptionalThe name of the pipeline to be used when attaching to the release instantiate from a release task. subreleasePipelineProjectStringoptionalThe name of the project which contains the pipeline to the release instantiate from a release task. subreleaseSuffixStringoptionalThe suffix to be used when creating release. subworkflowDefinitionStringoptionalIf referencing a workflow definition, the name of the workflow definition. subworkflowStartingStateStringoptionalThe name of the starting state in the specified workflow definition. taskProcessTypeStringoptionalThe type of the process a task can invoke. Possible values: "APPLICATION" , "OTHER" , "SERVICE" taskTypeStringoptionalpreviewThe type of task. Possible values: "APPROVAL" , "CI_JOB" , "COMMAND" , "COMPLIANCE_CHECK" , "CONDITIONAL" , "DEPLOYER" , "GROUP" , "MANUAL" , "PIPELINE" , "PLUGIN" , "PROCEDURE" , "PROCESS" , "RELEASE" , "UTILITY" , "WORKFLOW" timeZoneStringoptionalThe time zone to use when interpreting times. triggerTypeStringoptionalThe type of trigger when invoking a sub-pipeline. Possible values: "async" , "sync" useApproverAclBooleanoptionalTrue if after approve the authentication context of approving user should be added to the session. waitForPlannedStartDateBooleanoptionalTrue to enable waiting for planned start date. workspaceNameStringoptionalThe name of the workspace. |
Usage
Groovy
import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.createTask( projectName: "test-projectName", taskName: "test-taskName" /* optional arguments */ )