Trigger

7 minute readReference

createTrigger

Creates a new webhooks trigger.

Requirements and validations:

  • One of following combinations must be specified: [pipelineName], [releaseName], [catalogName, catalogItemName], [applicationName, processName, environmentName], [applicationName, processName, environmentName, environmentTemplateName], [procedureName].

  • The triggerType, pluginKey and pluginParameters arguments must be provided. The plugin must exist and be promoted. Webhook metadata properties must be present. Plugin parameters must match the associated plugin procedure.

  • If triggersType = webhook then the serviceAccountName argument must be provided.

  • Application triggers:

    • processName must be provided and must exist.

    • snapshot, environmentProjectName, environmentTemplateName, environmentTemplateProjectName, and all rolling deploy arguments must be provided.

    • environmentName must be provided.

  • Provide environmentTemplateProjectName only if environmentTemplateName is provided.

  • Provide only one of [environmentName, environmentProjectName] and [environmentTemplateName, environmentTemplateProjectName] application triggers.

  • Provide tierResourceCount for environmentTemplateName, only.

  • Provide stageToRun for pipeline and release triggers, only.

  • Provide pipelineParameter for release triggers, only.

  • The actualParameters argument must match the formal parameters of the triggered object.

  • Provide serviceAccountName, webhookName, and webhookSecret for webhook triggers, only.

Arguments

Argument Name Type Description

projectName

String

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

triggerName

String

(Required) The name of the trigger

actualParameters

Map

Actual parameters passed to the invoked object.

applicationName

String

The name of the application that owns the trigger and the process that should be run.

credentialName

String

The name of the credential to use for impersonation.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

enabled

Boolean

True to enable the task.

environmentName

String

The name of the environment used to determine where to run the process.

environmentProjectName

String

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

environmentTemplateName

String

The name of the environment template used to determine the environment where to run the process.

environmentTemplateProjectName

String

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

insertRollingDeployManualStep

Boolean

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

pipelineName

String

The name of the pipeline to run.

pipelineParameters

Map

Pipeline parameters used by a release schedule to override the default parameters configured in the release

pluginKey

String

The key of the plugin to be used for trigger integration with 3rd-party system

pluginParameters

Map

List of plugin parameters.

procedureName

String

The name of the procedure that owns the process to run.

processName

String

The name of the application process to invoke.

quietTimeMinutes

String

Specify how long in minutes should pass since last trigger event before the trigger will run.

releaseName

String

The name of the release to run.

rollingDeployEnabled

Boolean

Perform rolling deployment.

rollingDeployManualStepAssignees

Collection

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

rollingDeployManualStepCondition

NotificationType

Defines run condition on manual step created during rolling deployment.

rollingDeployPhases

Collection

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

runDuplicates

Boolean

Specify whether a trigger should be run if the previously triggered process is still running.

scmSyncName

String

The name of the scmSync trigger belong to.

serviceAccountName

String

The name of the service account associated with a webhook trigger

snapshotName

String

The name of the snapshot to be used to invoke the application process.

stagesToRun

Collection

One or more stages to run in a pipeline.

tierResourceCounts

Map

Resource count per resource template tier

triggerType

TriggerType

A type of trigger

webhookName

String

Webhook name.

webhookSecret

String

Webhook secret.

webhookSecretCredentialName

String

Webhook secret credential name.

webhookSecretCredentialProjectName

String

Webhook secret credential project name.

Positional arguments

projectName, triggerName

Usage

ec-perl

$cmdr->createTrigger(<projectName>, <triggerName>, {<optionals>});

ectool

ectool createTrigger projectName, triggerName, [optionals]

createTriggerErrorDetail

Creates a trigger error detail object.

Arguments

Argument Name Type Description

applicationName

String

The name of the application.

errorCode

String

Error code.

errorMessage

String

Error message.

includeDetails

Boolean

True to include details (default is false).

path

String

Property path string.

pipelineName

String

The name of the pipeline.

procedureName

String

The name of the procedure.

projectName

String

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

releaseName

String

The name of the release.

scmSyncName

String

The name of the scmSync.

triggerName

String

The name of the trigger.

webhookHeaders

String

JSON contains webhook headers.

webhookPayload

String

JSON contains webhook payload.

Positional arguments

None.

Usage

ec-perl

$cmdr->createTriggerErrorDetail({<optionals>});

ectool

ectool createTriggerErrorDetail [optionals]

deleteTrigger

Deletes a trigger.

Arguments

Argument Name Type Description

projectName

String

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

triggerName

String

(Required) The name of the trigger.

applicationName

String

The name of the application that owns the trigger and the process that should be run.

pipelineName

String

The name of the pipeline to run.

procedureName

String

The name of the procedure that owns the process to run.

releaseName

String

The name of the release to run.

scmSyncName

String

The name of the scmSync trigger belong to.

Positional arguments

projectName, triggerName

Usage

ec-perl

$cmdr->deleteTrigger(<projectName>, <triggerName>, {<optionals>});

ectool

ectool deleteTrigger projectName, triggerName, [optionals]

deleteTriggerErrorDetail

Deletes the specified trigger error detail.

Arguments

Argument Name Type Description

triggerErrorDetailId

UUID

(Required) The ID of trigger error detail.

Positional arguments

triggerErrorDetailId

Usage

ec-perl

$cmdr->deleteTriggerErrorDetail(<triggerErrorDetailId>);

ectool

ectool deleteTriggerErrorDetail triggerErrorDetailId

getTrigger

Retrieves a trigger by name.

Arguments

Argument Name Type Description

projectName

String

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

triggerName

String

(Required) The name of the trigger.

applicationName

String

The name of the application that owns the trigger and the process that should be run.

pipelineName

String

The name of the pipeline to run.

procedureName

String

The name of the procedure that owns the process to run.

releaseName

String

The name of the release to run.

scmSyncName

String

The name of the scmSync trigger belong to.

Positional arguments

projectName, triggerName

Usage

ec-perl

$cmdr->getTrigger(<projectName>, <triggerName>, {<optionals>});

ectool

ectool getTrigger projectName, triggerName, [optionals]

getTriggerErrorDetails

Retrieves a list of trigger error details.

Arguments

Argument Name Type Description

applicationName

String

The name of the application.

includeDetails

Boolean

True to include details (default is false).

path

String

Property path string.

pipelineName

String

The name of the pipeline.

procedureName

String

The name of the procedure.

projectName

String

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

releaseName

String

The name of the release.

scmSyncName

String

The name of the scmSync.

triggerName

String

The name of the trigger.

Positional arguments

None.

Usage

ec-perl

$cmdr->getTriggerErrorDetails({<optionals>});

ectool

ectool getTriggerErrorDetails [optionals]

getTriggers

Retrieves all triggers.

Arguments

Argument Name Type Description

projectName

String

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

applicationName

String

The name of the application that owns the trigger and the process that should be run.

pipelineName

String

The name of the pipeline to run.

procedureName

String

The name of the procedure that owns the process to run.

releaseName

String

The name of the release to run.

scmSyncName

String

The name of the scmSync trigger belong to.

validate

Boolean

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

Positional arguments

projectName

Usage

ec-perl

$cmdr->getTriggers(<projectName>, {<optionals>});

ectool

ectool getTriggers projectName, [optionals]

modifyTrigger

Modifies an existing trigger.

Arguments

Argument Name Type Description

projectName

String

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

triggerName

String

(Required) The name of the trigger

actualParameters

Map

Actual parameters passed to the invoked object.

applicationName

String

The name of the application that owns the trigger and the process that should be run.

clearActualParameters

Boolean

Whether or not to clear actual parameters for this object.

clearPipelineParameters

Boolean

Whether or not to clear pipeline parameters for the trigger.

credentialName

String

The name of the credential to use for impersonation.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

enabled

Boolean

True to enable the task.

environmentName

String

The name of the environment used to determine where to run the process.

environmentProjectName

String

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

environmentTemplateName

String

The name of the environment template used to determine the environment where to run the process.

environmentTemplateProjectName

String

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

insertRollingDeployManualStep

Boolean

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

newName

String

The new name for an existing object that is being renamed.

pipelineName

String

The name of the pipeline to run.

pipelineParameters

Map

Pipeline parameters used by a release schedule to override the default parameters configured in the release

pluginKey

String

The key of the plugin to be used for trigger integration with 3rd-party system

pluginParameters

Map

List of plugin parameters.

procedureName

String

The name of the procedure that owns the process to run.

processName

String

The name of the application process to invoke.

quietTimeMinutes

String

Specify how long in minutes should pass since last trigger event before the trigger will run.

releaseName

String

The name of the release to run.

rollingDeployEnabled

Boolean

Perform rolling deployment.

rollingDeployManualStepAssignees

Collection

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

rollingDeployManualStepCondition

NotificationType

Defines run condition on manual step created during rolling deployment.

rollingDeployPhases

Collection

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

runDuplicates

Boolean

Specify whether a trigger should be run if the previously triggered process is still running.

scmSyncName

String

The name of the scmSync trigger belong to.

serviceAccountName

String

The name of the service account associated with a webhook trigger

snapshotName

String

The name of the snapshot to be used to invoke the application process.

stagesToRun

Collection

One or more stages to run in a pipeline.

tierResourceCounts

Map

Resource count per resource template tier

triggerType

TriggerType

A type of trigger

webhookName

String

Webhook name.

webhookSecret

String

Webhook secret.

webhookSecretCredentialName

String

Webhook secret credential name.

webhookSecretCredentialProjectName

String

Webhook secret credential project name.

Positional arguments

projectName, triggerName

Usage

ec-perl

$cmdr->modifyTrigger(<projectName>, <triggerName>, {<optionals>});

ectool

ectool modifyTrigger projectName, triggerName, [optionals]

runTrigger

Runs the specified trigger.

Valid parameter combinations for each trigger type:

  • Application: [projectName,applicationName, triggerName]

  • Catalog item: [projectName, catalogName, catalogItemName, triggerName]

  • Pipeline: [projectName, pipelineName, triggerName]

  • Release: [projectName, releaseName, triggerName]

  • Procedure: [projectName, procedureName, triggerName]

Arguments

Argument Name Type Description

applicationName

String

The name of the application.

parsedWebhookData

String

JSON with parsed webhook data to be set on a pipeline/release/procedure run.

path

String

Property path string.

pipelineName

String

The name of the pipeline.

procedureName

String

Name for the procedure; must be unique within the project.

projectName

String

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

releaseName

String

The name of the release.

scmSyncName

String

The name of the scm sync.

triggerName

String

The name of the trigger.

webhookData

String

The webhook data to be set on the pipeline/release/procedure run.

webhookHeaders

String

The webhook headers in JSON format to be set on the pipeline/release/procedure run.

Positional arguments

None.

Usage

ec-perl

$cmdr->runTrigger({<optionals>});

ectool

ectool runTrigger [optionals]

setupWebhook

Sets up the webhook trigger in the source control repository using specified actual parameters and credentials. In addition, it passes the webhookSecret and triggerId as parameters from those specified in triggerName.

Requirements and validations:

  • One of following must be specified: [pipelineName], [releaseName], [catalogName, catalogItemName], [applicationName], [procedureName]

  • The actualParameters argument must match the formal parameters of the triggered object.

Arguments

Argument Name Type Description

actualParameters

Map

Parameters passed to the invoked procedure.

applicationName

String

The name of the application.

credentials

Collection

Credentials to be used in the job.

path

String

Property path string.

pipelineName

String

The name of the pipeline.

procedureName

String

Name for the procedure; must be unique within the project.

projectName

String

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

releaseName

String

The name of the release.

scmSyncName

String

The name of the scm sync.

triggerName

String

The name of the trigger.

Positional arguments

None.

Usage

ec-perl

$cmdr->setupWebhook({<optionals>});

ectool

ectool setupWebhook [optionals]