Task commands

createTask

Creates a new task for a task container.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

taskName

String

The name of the task (Required)

pipelineName

String

The name of the pipeline

stageName

String

Name of the stage to which this task belongs to.

actionLabelText

String

The Json derived action label text

actualParameters

array

Actual parameters passed to an invoked subprocedure

advancedMode

Boolean

True to enable advanced mode so as to templatize snapshotName.

afterLastRetry

String

Specify continue or stop pipeline execution after last unsuccessful retry or a task.

afterTask

String

If specified, the task will be placed after the named task.

allowOutOfOrderRun

Boolean

If True, allow to run a task out of order.

allowSkip

Boolean

When enabled, manual task or gate rule can be skipped.

alwaysRun

Boolean

True means this task will run even if preceding tasks fail in a way that aborts the pipeline

approvers

String array

A list of task approvers who receive the notification.

beforeTask

String

If specified, the task will be placed before the named task.

ciConfigurationName

String

CI Configuration name

ciJobFolder

String

Path 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/…​ .

ciJobName

String

Name of the CI job

condition

String

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.

customLabel

String

Custom display name for sub pipelines or releases

deployerExpression

String

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.

deployerRunType

String

The type of the deployer run for deployer type of task. If parallel then all applications are deployed in parallel.

description

String

Comment text describing this object that is not interpreted at all by CloudBees Flow.

disableFailure

Boolean

True means a manual task cannot be failed.

duration

String

Duration in minutes for which the stage or task should relative to 'plannedStartDate'.

emailConfigName

String

The name of email configuration

enabled

Boolean

True to enable the task.

environmentName

String

Environment name to create from template.

environmentProjectName

String

Name for the project to which the environment or environment template belongs to.

environmentTemplateName

String

Environment template name.

environmentTemplateProjectName

String

Name for the project to which the environment template belongs to.

errorHandling

String

Specifies error handling for this task.

firstTask

Boolean

True to make a task first in a stage.

gateCondition

String

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.

gateType

String

The type of the gate.

groupName

String

The name of the group of task.

groupRunType

String

The type of the sub task run for a group task. If serial then all tasks are run in serial, otherwise - in parallel (by default).

insertRollingDeployManualStep

Boolean

True to indicate a manual step needs to be injected after each phase or batch.

instruction

String

Instruction associated with the task.

keepOnError

Boolean

True to keep environment on error (default is false)

notificationEnabled

Boolean

True means this email notification is enabled, false otherwise.

notificationTemplate

String

String containing email formatting instructions for generating notifications.

outOfOrderRunAssignees

String array

A list of users who can run a task out of order.

parallelToPrevious

Boolean

If TRUE, the flow state will be run in parallel to the previous flow state

plannedEndDate

String

The date when this stage or task is expected to end.

plannedStartDate

String

The date when this stage or task is expected to start.

precondition

String

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

String

The name of the release

requiredApprovalsCount

String

The number of users from a group that should approve the task before it’s considered as finally approved.

resourceName

String

The name of the default resource for this task.

retryCount

String

If the retry is auto, specify the maximum number of times retry should occur.

retryInterval

String

If the retry is auto, specify the number of seconds to wait until the next retry should occur.

retryType

String

Type of rety when process step or task fails. Is one of 'auto' or 'manual'

rollingDeployEnabled

Boolean

Perform rolling deployment.

rollingDeployManualStepAssignees

String array

A list of assignees who receive the notification when rolling deploy iteration completes.

rollingDeployManualStepCondition

String

Defines run condition on manual step created during rolling deployment.

rollingDeployPhases

String array

One or more rolling deploy phases to be used for deployment.

skippable

Boolean

True if a task is skippable.

snapshotName

String

Name of the snapshot associated with the application.

stageSummaryParameters

String

JSON representation of stage summary parameters and labels

stagesToRun

String array

One or more stages to run in a pipeline.

startTime

String

The time of day to begin invoking this task (24-hour clock, for example, 17:00).

startingStage

String

The name of the starting stage.

subErrorHandling

String

The impact of invoking pipeline run when sub-pipeline fails.

subapplication

String

The name of the application that owns the subprocess.

subpipeline

String

If referencing a pipeline, the name of the pipeline.

subpluginKey

String

If referencing a procedure, the name of the procedure’s pluginKey.

subprocedure

String

If referencing a procedure, the name of the procedure.

subprocess

String

The name of the process.

subproject

String

If referencing a procedure, the name of the procedure’s project.

subrelease

String

If referencing a release, the name of the release.

subreleasePipeline

String

The name of the pipeline to be used when attaching to the release instantiate from a releae task.

subreleasePipelineProject

String

The name of the project which contains the pipeline to the release instantiate from a releae task.

subreleaseSuffix

String

The suffix to be used when creating release.

subservice

String

The name of the service that owns the subprocess.

subworkflowDefinition

String

If referencing a workflow definition, the name of the workflow definition.

subworkflowStartingState

String

The name of the starting state in the specified workflow definition.

taskProcessType

String

The type of the process a task can invoke.

taskType

String

The type of the task.

tierResourceCounts

array

Resource count per resource template tier

timeZone

String

The time zone to use when interpreting times.

triggerType

String

The type of trigger when invoking a sub-pipeline.

useApproverAcl

Boolean

True if after approve the authentication context of approving user should be added to the session.

waitForPlannedStartDate

Boolean

True to enable waiting for planned start date.

workspaceName

String

The name of the workspace.

Usage

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 */)

createTaskGroup

Modifies tasks in a stage or a gate to create a group of parallel tasks or to add them into an existent group.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

pipelineName

String

The name of the pipeline

stageName

String

Name of the stage to which this task belongs to.

gateType

String

The type of the gate.

groupName

String

The name of the group task

groupRunType

String

The type of the sub task run for a group task. If serial then all tasks are run in serial, otherwise - in parallel (by default).

releaseName

String

The name of the release

taskNames

String array

Tasks to put into the group

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.createTaskGroup(
                projectName: 'test-projectName',
                /* optional arguments */)

deleteTask

Delete a task.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

taskName

String

The name of the task (Required)

stageName

String

Name of the stage to which this task belongs to.

gateType

String

The type of the gate.

pipelineName

String

The name of the pipeline

releaseName

String

The name of the release

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.deleteTask(
                projectName: 'test-projectName',
                taskName: 'test-taskName'
                /* optional arguments */)

getAllWaitingTasks

Return a list of all tasks across pipeline runs for a release, that are currently waiting on manual.

Arguments

Argument Name Type Description

projectName

String

Name for the project; must be unique among all projects.

releaseName

String

The name of the release

flowRuntimeId

String

The id of the flow runtime

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getAllWaitingTasks(
                /* optional arguments */)

getPipelineStageRuntimeDeployerTasks

Return a list of pipeline stage deployer tasks and it’s details for display in pipeline run details view.

Arguments

Argument Name Type Description

flowRuntimeId

String

The id of the flow runtime (Required)

stageName

String

The name of the stage (Required)

taskName

String

The name of the deployer task (Required)

firstResult

Integer

Result pagination: the first row to return.

groupRunNumber

Integer

The group run number

maxResults

Integer

Result pagination: the number of rows to return.

sortKey

String

How to sort the results.

sortOrder

String

Which order to sort in

stageRunNumber

Integer

The stage run number

taskRunNumber

Integer

The task run number

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getPipelineStageRuntimeDeployerTasks(
                flowRuntimeId: 'test-flowRuntimeId',
                stageName: 'test-stageName',
                taskName: 'test-taskName'
                /* optional arguments */)

getPipelineStageRuntimeTasks

Return a list of pipeline stage tasks and it’s details for display in pipeline run view.

Arguments

Argument Name Type Description

flowRuntimeId

String

The id of the flow runtime (Required)

stageName

String

The name of the stage

firstResult

Integer

Result pagination: the first row to return.

maxResults

Integer

Result pagination: the number of rows to return.

sortKey

String

How to sort the results.

sortOrder

String

Which order to sort in

stageRunNumber

Integer

The stage run number

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getPipelineStageRuntimeTasks(
                flowRuntimeId: 'test-flowRuntimeId',
                /* optional arguments */)

getTask

Retrieve a task by name.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

taskName

String

The name of the task (Required)

stageName

String

Name of the stage to which this task belongs to.

gateType

String

The type of the gate.

pipelineName

String

The name of the pipeline

releaseName

String

The name of the release

timeZone

String

The time zone to use when interpreting times.

validate

Boolean

If passed 1, then all validations check if the definition is complete and valid.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getTask(
                projectName: 'test-projectName',
                taskName: 'test-taskName'
                /* optional arguments */)

getTasks_5

Retrieve all tasks.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

stageName

String

Name of the stage to which this task belongs to.

gateType

String

The type of the gate.

pipelineName

String

The name of the pipeline

releaseName

String

The name of the release

validate

Boolean

If passed 1, then all validations check if the definition is complete and valid.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getTasks(
                projectName: 'test-projectName',
                /* optional arguments */)

getWaitingTasks

Return a list of all stage tasks which are currently waiting on manual in pipeline run.

Arguments

Argument Name Type Description

flowRuntimeId

String

The id of the flow runtime (Required)

stageName

String

The name of the stage (Required)

taskName

String

The name of the deployer or group task

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getWaitingTasks(
                flowRuntimeId: 'test-flowRuntimeId',
                stageName: 'test-stageName'
                /* optional arguments */)

modifyTask

Modifies an existing task.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

taskName

String

The name of the task (Required)

pipelineName

String

The name of the pipeline

stageName

String

Name of the stage to which this task belongs to.

actionLabelText

String

The Json derived action label text

actualParameters

array

Actual parameters passed to an invoked subprocedure

advancedMode

Boolean

True to enable advanced mode so as to templatize snapshotName.

afterLastRetry

String

Specify continue or stop pipeline execution after last unsuccessful retry or a task.

afterTask

String

If specified, the task will be placed after the named task.

allowOutOfOrderRun

Boolean

If True, allow to run a task out of order.

allowSkip

Boolean

When enabled, manual task or gate rule can be skipped.

alwaysRun

Boolean

True means this task will run even if preceding tasks fail in a way that aborts the pipeline

approvers

String array

A list of task approvers who receive the notification.

beforeTask

String

If specified, the task will be placed before the named task.

ciConfigurationName

String

CI Configuration name

ciJobFolder

String

Path 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/…​ .

ciJobName

String

Name of the CI job

clearActualParameters

Boolean

True if the task should remove all actual parameters.

clearOutOfOrderRunAssignees

Boolean

True if the task should clean up all outOfOrderRunAssignees.

clearStageSummaryParameters

Boolean

True if the task should remove all stage summary parameters

condition

String

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.

customLabel

String

Custom display name for sub pipelines or releases

deployerExpression

String

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.

deployerRunType

String

The type of the deployer run for deployer type of task. If parallel then all applications are deployed in parallel.

description

String

Comment text describing this object that is not interpreted at all by CloudBees Flow.

disableFailure

Boolean

True means a manual task cannot be failed.

duration

String

Duration in minutes for which the stage or task should relative to 'plannedStartDate'.

emailConfigName

String

The name of email configuration

enabled

Boolean

True to enable the task.

environmentName

String

Environment name to create from template.

environmentProjectName

String

Name for the project to which the environment or environment template belongs to.

environmentTemplateName

String

Environment template name.

environmentTemplateProjectName

String

Name for the project to which the environment template belongs to.

errorHandling

String

Specifies error handling for this task.

firstTask

Boolean

True to make a task first in a stage.

gateCondition

String

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.

gateType

String

The type of the gate.

groupName

String

The name of the group of task.

groupRunType

String

The type of the sub task run for a group task. If serial then all tasks are run in serial, otherwise - in parallel (by default).

insertRollingDeployManualStep

Boolean

True to indicate a manual step needs to be injected after each phase or batch.

instruction

String

Instruction associated with the task.

keepOnError

Boolean

True to keep environment on error (default is false)

newName

String

New name for an existing object that is being renamed.

notificationEnabled

Boolean

True means this email notification is enabled, false otherwise.

notificationTemplate

String

String containing email formatting instructions for generating notifications.

outOfOrderRunAssignees

String array

A list of users who can run a task out of order.

parallelToPrevious

Boolean

If TRUE, the flow state will be run in parallel to the previous flow state

plannedEndDate

String

The date when this stage or task is expected to end.

plannedStartDate

String

The date when this stage or task is expected to start.

precondition

String

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

String

The name of the release

requiredApprovalsCount

String

The number of users from a group that should approve the task before it’s considered as finally approved.

resourceName

String

The name of the default resource for this task.

retryCount

String

If the retry is auto, specify the maximum number of times retry should occur.

retryInterval

String

If the retry is auto, specify the number of seconds to wait until the next retry should occur.

retryType

String

Type of rety when process step or task fails. Is one of 'auto' or 'manual'

rollingDeployEnabled

Boolean

Perform rolling deployment.

rollingDeployManualStepAssignees

String array

A list of assignees who receive the notification when rolling deploy iteration completes.

rollingDeployManualStepCondition

String

Defines run condition on manual step created during rolling deployment.

rollingDeployPhases

String array

One or more rolling deploy phases to be used for deployment.

skippable

Boolean

True if a task is skippable.

snapshotName

String

Name of the snapshot associated with the application.

stageSummaryParameters

String

JSON representation of stage summary parameters and labels

stagesToRun

String array

One or more stages to run in a pipeline.

startTime

String

The time of day to begin invoking this task (24-hour clock, for example, 17:00).

startingStage

String

The name of the starting stage.

subErrorHandling

String

The impact of invoking pipeline run when sub-pipeline fails.

subapplication

String

The name of the application that owns the subprocess.

subpipeline

String

If referencing a pipeline, the name of the pipeline.

subpluginKey

String

If referencing a procedure, the name of the procedure’s pluginKey.

subprocedure

String

If referencing a procedure, the name of the procedure.

subprocess

String

The name of the process.

subproject

String

If referencing a procedure, the name of the procedure’s project.

subrelease

String

If referencing a release, the name of the release.

subreleasePipeline

String

The name of the pipeline to be used when attaching to the release instantiate from a releae task.

subreleasePipelineProject

String

The name of the project which contains the pipeline to the release instantiate from a releae task.

subreleaseSuffix

String

The suffix to be used when creating release.

subservice

String

The name of the service that owns the subprocess.

subworkflowDefinition

String

If referencing a workflow definition, the name of the workflow definition.

subworkflowStartingState

String

The name of the starting state in the specified workflow definition.

taskProcessType

String

The type of the process a task can invoke.

taskType

String

The type of the task.

tierResourceCounts

array

Resource count per resource template tier

timeZone

String

The time zone to use when interpreting times.

triggerType

String

The type of trigger when invoking a sub-pipeline.

useApproverAcl

Boolean

True if after approve the authentication context of approving user should be added to the session.

waitForPlannedStartDate

Boolean

True to enable waiting for planned start date.

workspaceName

String

The name of the workspace.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.modifyTask(
                projectName: 'test-projectName',
                taskName: 'test-taskName'
                /* optional arguments */)