Trigger management

12 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.

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.

releaseName

String

The name of the release to run.

actualParameters

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.

catalogItemName

String

Name of the catalog item to invoke.

catalogName

String

Name of the catalog containing the catalogItemName.

credentialName

String

The name of the credential to use for impersonation.

description

String

User-supplied descriptive text.

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 of the project to which the environment or environment template belongs to.

environmentTemplateName

String

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

environmentTemplateProjectName

String

Name of the project to which the environmentTemplateName 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

Pipeline parameters to override the default release schedule parameters.

pluginKey

String

The key of the plugin to be used for trigger integration with a third-party system.

pluginParameters

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, since the last trigger event to wait before running this trigger.

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.

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.

serviceAccountName

String

The name of the service account associated with this trigger.

snapshotName

String

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

stagesToRun

String array

One or more stages to run in a pipeline.

tierResourceCounts

Resource count per resource template tier.

triggerType

String

The type of this trigger: polling|webhook.

webhookName

String

Webhook name.

webhookSecret

String

Webhook secret.

Response

<response requestId="1" nodeId="10.30.176.58"> <trigger> <triggerId>b2c4b9c7-1d32-11ec-979d-42010a1eb03a</triggerId> <triggerName>qe trigger 1</triggerName> <accessTokenPublicId>901tnqudquet9zd1dwbn2al2f5lafc</accessTokenPublicId> <createTime>2021-09-24T12:26:52.634Z</createTime> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2021-09-24T12:26:52.634Z</modifyTime> <owner>admin</owner> <pipelineName>qe pipeline</pipelineName> <pluginKey>EC-Github</pluginKey> <projectName>qe proj</projectName> <propertySheetId>b2c4e0d9-1d32-11ec-979d-42010a1eb03a</propertySheetId> <quietTimeMinutes>0</quietTimeMinutes> <runDuplicates>1</runDuplicates> <serviceAccountName>qe service name</serviceAccountName> <tracked>1</tracked> <triggerEnabled>1</triggerEnabled> <triggerType>webhook</triggerType> <webhookName>default</webhookName> <pluginParameters> <parameterDetail> <parameterName>repositories</parameterName> <parameterValue>test/testrepo</parameterValue> </parameterDetail> </pluginParameters> </trigger> </response>

ec-perl

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

Pipeline example

$ec->createTrigger("qe proj", "qe trigger 1", {pipelineName =>"qe pipeline name", triggerType =>"webhook", pluginKey=>"EC-Github", pluginParameter =>[ {pluginParameterName =>"repositories", value =>"test/testrepo"}], serviceAccountName =>"qe service name", webhookSecret =>"push"});

Procedure example

$ec->createTrigger("qe proj", "qe trigger 1", {procedureName =>"qe procedure", triggerType =>"webhook", pluginKey=>"EC-Github", pluginParameter =>[ {pluginParameterName =>"repositories", value =>"test/testrepo"}], serviceAccountName =>"qe service name", webhookSecret =>"push"});

ectool usage

Usage: createTrigger <projectName> <triggerName> [--actualParameter <var1>=<val1> [<var2>=<val2> ...]] [--applicationName <applicationName>] [--catalogItemName <catalogItemName>] [--catalogName <catalogName>] [--credentialName <credentialName>] [--description <description>] [--enabled <0|1|true|false>] [--environmentName <environmentName>] [--environmentProjectName <environmentProjectName>] [--environmentTemplateName <environmentTemplateName>] [--environmentTemplateProjectName <environmentTemplateProjectName>] [--insertRollingDeployManualStep <0|1|true|false>] [--pipelineName <pipelineName>] [--pipelineParameter <var1>=<val1> [<var2>=<val2> ...]] [--pluginKey <pluginKey>] [--pluginParameter <var1>=<val1> [<var2>=<val2> ...]] [--procedureName <procedureName>] [--processName <processName>] [--quietTimeMinutes <quietTimeMinutes>] [--releaseName <releaseName>] [--rollingDeployEnabled <0|1|true|false>] [--rollingDeployManualStepAssignees rollingDeployManualStepAssignee1 rollingDeployManualStepAssignee2 ...] [--rollingDeployManualStepCondition <always|failure|success>] [--rollingDeployPhases rollingDeployPhase1 rollingDeployPhase2 ...] [--runDuplicates <0|1|true|false>] [--serviceAccountName <serviceAccountName>] [--snapshotName <snapshotName>] [--stagesToRun stagesToRun1 stagesToRun2 ...] [--tierResourceCount <envTemplateTierName>=<resourceCount> [<envTemplateTierName>=<resourceCount> ...]] [--triggerType <polling|webhook>] [--webhookName <webhookName>] [--webhookSecret <webhookSecret>]

Pipeline example

ectool createTrigger 'qe proj' 'qe trigger 1' --pipelineName 'qe pipeline' --triggerType 'webhook' --pluginKey 'EC-Github' --pluginParameter repositories='test/testrepo' --serviceAccountName 'qe service name' --webhookSecret 'push'

Procedure example

ectool createTrigger 'qe proj' 'qe trigger 1' --procedureName 'qe procedure' --triggerType 'webhook' --pluginKey 'EC-Github' --pluginParameter repositories='test/testrepo' --serviceAccountName 'qe service name' --webhookSecret 'push'

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 to delete.

releaseName

String

The name of the release to run.

applicationName

String

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

catalogItemName

String

Name of the catalog item to invoke.

catalogName

String

Name of the catalog containing catalogItemName to invoke.

pipelineName

String

The name of the pipeline to run.

procedureName

String

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

scmSyncName

String

The name of the scmSync trigger.

Response

No response.

ec-perl usage

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

Example

# for pipeline $cmdr->deleteTrigger("qe proj", "qe trigger 1", {pipelineName => "qe pipeline name"}); # for procedure $cmdr->deleteTrigger("qe proj", "qe trigger 1", {procedureName => "qe procedure"});

ectool usage

Usage: deleteTrigger <projectName> <triggerName> [--applicationName <applicationName>] [--catalogItemName <catalogItemName>] [--catalogName <catalogName>] [--pipelineName <pipelineName>] [--procedureName <procedureName>] [--releaseName <releaseName>]

Example

# for pipeline ectool deleteTrigger 'qe proj' 'qe trigger 1' --pipelineName 'qe pipeline' # for procedure ectool deleteTrigger 'qe proj' 'qe trigger 1' --procedureName 'qe procedure'

getTrigger

Retrieve 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.

releaseName

String

The name of the release to run.

applicationName

String

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

catalogItemName

String

Name of the catalog item to invoke.

catalogName

String

Name of the catalog containing the catalog item to invoke.

pipelineName

String

The name of the pipeline to run.

procedureName

String

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

scmSyncName

String

The name of the scmSync trigger.

Response

<response requestId="1" nodeId="10.30.176.58"> <trigger> <triggerId>d959ef44-1d33-11ec-963d-42010a1eb03a </triggerId> <triggerName>qe trigger 1</triggerName> <accessTokenPublicId>jax2mlmfu8ltmmwdatn21rrji9ifwm</accessTokenPublicId> <createTime>2021-09-24T12:35:04.890Z</createTime> <hasWebhookSetupProcedure>1</hasWebhookSetupProcedure> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2021-09-24T12:35:04.890Z</modifyTime> <owner>admin</owner> <pipelineName>qe pipeline</pipelineName> <pluginKey>EC-Github</pluginKey> <projectName>qe proj</projectName> <propertySheetId>d959ef46-1d33-11ec-963d-42010a1eb03a</propertySheetId> <quietTimeMinutes>0</quietTimeMinutes> <runDuplicates>1</runDuplicates> <serviceAccountName>qe service name</serviceAccountName> <tracked>1</tracked> <triggerEnabled>1</triggerEnabled> <triggerType>webhook</triggerType> <webhookName>default</webhookName> <webhookUrl>https://[server_ip]/commander/link/webhookServerRequest?tokenId=jax2mlmfu8ltmmwdatn21rrji9ifwm</webhookUrl> <pluginParameters> <parameterDetail> <parameterName>repositories</parameterName> <parameterValue>test/testrepo</parameterValue> </parameterDetail> </pluginParameters> </trigger> </response>

ec-perl usage

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

Example

# for pipeline $cmdr->getTrigger("qe proj", "qe trigger 1", {pipelineName => "qe pipeline name"});

ectool usage

Usage: getTrigger <projectName> <triggerName> [--applicationName <applicationName>] [--catalogItemName <catalogItemName>] [--catalogName <catalogName>] [--pipelineName <pipelineName>] [--procedureName <procedureName>] [--releaseName <releaseName>]

Example

ectool getTrigger 'qe proj' 'qe trigger 1' --procedureName 'qe procedure'

getTriggers

Retrieve all triggers.

Arguments

Argument Name Type Description

projectName

String

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

releaseName

String

The name of the release to run.

applicationName

String

The name of the application process that owns the trigger.

catalogItemName

String

Name of the catalog item to invoke.

catalogName

String

Name of the catalog containing catalogItemName.

pipelineName

String

The name of the pipeline to run.

procedureName

String

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

scmSyncName

String

The name of the scmSync trigger.

validate

Boolean

If set to 1, then perform validation and completeness check.

Response

<trigger> <triggerId>e4076efc-1d34-11ec-979d-42010a1eb03a</triggerId> <triggerName>qe trigger 1</triggerName> <accessTokenPublicId>fzx8lqw0mv35n6zmw9vf5trnlqofcp</accessTokenPublicId> <createTime>2021-09-24T12:42:33.407Z</createTime> <definitionValid>1</definitionValid> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2021-09-24T12:42:33.407Z</modifyTime> <owner>admin</owner> <pipelineName>qe pipeline</pipelineName> <pluginKey>EC-Github</pluginKey> <projectName>qe proj GetTriggersozlhn</projectName> <propertySheetId>e4076efe-1d34-11ec-979d-42010a1eb03a</propertySheetId> <quietTimeMinutes>0</quietTimeMinutes> <runDuplicates>1</runDuplicates> <serviceAccountName>qe service</serviceAccountName> <tracked>1</tracked> <triggerEnabled>1</triggerEnabled> <triggerType>webhook</triggerType> <webhookName>default</webhookName> <pluginParameters> <parameterDetail> <parameterName>repositories</parameterName> <parameterValue>test/testrepo</parameterValue> </parameterDetail> </pluginParameters> </trigger>

ec-perl usage

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

Example

# for pipeline $cmdr->getTriggers("qe proj", "qe trigger 1", {pipelineName => "qe pipeline name", validate => '1'}); # for procedure $cmdr->getTriggers("qe proj", "qe trigger 1", {procedureName => "qe procedure", validate => '1'});

modifyTrigger

Modify 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.

releaseName

String

The name of the release to run.

actualParameters

Actual parameters passed to the invoked object.

applicationName

String

The name of the application that owns the trigger.

catalogItemName

String

Name of the catalog item to invoke.

catalogName

String

Name of the catalog containing catalogItemName.

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

User-defined descriptive text.

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 of the project to which the environment template belongs.

insertRollingDeployManualStep

Boolean

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

newName

String

New name for an existing object that is being renamed.

pipelineName

String

The name of the pipeline to run

pipelineParameters

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 third-party system.

pluginParameters

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 since last trigger event before running this trigger.

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.

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

String array

One or more stages to run in a pipeline.

tierResourceCounts

Resource count per resource template tier.

triggerType

String

A type of trigger.

webhookName

String

Webhook name.

webhookSecret

String

Webhook secret.

Response

<response requestId="1" nodeId="10.30.176.58"> <trigger> <triggerId>b2c4b9c7-1d32-11ec-979d-42010a1eb03a</triggerId> <triggerName>qe trigger 1</triggerName> <accessTokenPublicId>901tnqudquet9zd1dwbn2al2f5lafc</accessTokenPublicId> <createTime>2021-09-24T12:26:52.634Z</createTime> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2021-09-24T12:26:52.634Z</modifyTime> <owner>admin</owner> <pipelineName>qe pipeline</pipelineName> <pluginKey>EC-Github</pluginKey> <projectName>qe proj</projectName> <propertySheetId>b2c4e0d9-1d32-11ec-979d-42010a1eb03a</propertySheetId> <quietTimeMinutes>0</quietTimeMinutes> <runDuplicates>1</runDuplicates> <serviceAccountName>qe service name</serviceAccountName> <tracked>1</tracked> <triggerEnabled>1</triggerEnabled> <triggerType>webhook</triggerType> <webhookName>default</webhookName> <pluginParameters> <parameterDetail> <parameterName>repositories</parameterName> <parameterValue>test/testrepo</parameterValue> </parameterDetail> </pluginParameters> </trigger> </response>

ec-perl usage

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

Example

# for pipeline $cmdr->modifyTrigger("qe proj", "qe trigger 1", {pipelineName => "qe pipeline name", triggerType => "webhook", pluginKey=> "EC-Github", pluginParameter => [{pluginParameterName=> "repositories",value =>"test/testrepo"}], serviceAccountName => 'qe service name', webhookSecret => 'push'}); # for procedure $cmdr->modifyTrigger("qe proj", "qe trigger 1", {procedureName => "qe procedure", triggerType => "webhook", pluginKey=> "EC-Github", pluginParameter => [{pluginParameterName=> "repositories",value =>"test/testrepo"}], serviceAccountName => 'qe service name', webhookSecret => 'push'});

ectool usage

Usage: modifyTrigger <projectName> <triggerName> [--actualParameter <var1>=<val1> [<var2>=<val2> ...]] [--applicationName <applicationName>] [--catalogItemName <catalogItemName>] [--catalogName <catalogName>] [--clearActualParameters <0|1|true|false>] [--clearPipelineParameters <0|1|true|false>] [--credentialName <credentialName>] [--description <description>] [--enabled <0|1|true|false>] [--environmentName <environmentName>] [--environmentProjectName <environmentProjectName>] [--environmentTemplateName <environmentTemplateName>] [--environmentTemplateProjectName <environmentTemplateProjectName>] [--insertRollingDeployManualStep <0|1|true|false>] [--newName <newName>] [--pipelineName <pipelineName>] [--pipelineParameter <var1>=<val1> [<var2>=<val2> ...]] [--pluginKey <pluginKey>] [--pluginParameter <var1>=<val1> [<var2>=<val2> ...]] [--procedureName <procedureName>] [--processName <processName>] [--quietTimeMinutes <quietTimeMinutes>] [--releaseName <releaseName>] [--rollingDeployEnabled <0|1|true|false>] [--rollingDeployManualStepAssignees rollingDeployManualStepAssignee1 rollingDeployManualStepAssignee2 ...] [--rollingDeployManualStepCondition <always|failure|success>] [--rollingDeployPhases rollingDeployPhase1 rollingDeployPhase2 ...] [--runDuplicates <0|1|true|false>] [--serviceAccountName <serviceAccountName>] [--snapshotName <snapshotName>] [--stagesToRun stagesToRun1 stagesToRun2 ...] [--tierResourceCount <envTemplateTierName>=<resourceCount> [<envTemplateTierName>=<resourceCount> ...]] [--triggerType <polling|webhook>] [--webhookName <webhookName>] [--webhookSecret <webhookSecret>]

Example

ectool modifyTrigger 'qe proj' 'qe trigger 1' --procedureName 'qe procedure' --triggerType 'webhook' --pluginKey 'EC-Github' --pluginParameter repositories='test/testrepo' --serviceAccountName 'qe service name' --webhookSecret 'push'

runTrigger

Run 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.

catalogItemName

String

The name of the catalog item.

catalogName

String

The name of the catalog.

parsedWebhookData

String

JSON with parsed webhook data to be set on an object.

path

String

Property path string. For example, /projects/Default/pipelines/pipe1/triggers/trigger1.

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.

Response

Returns the associated object type based on type of runtime operation:

  • application: RunProcedureResult

  • procedure: RunProcedureResult

  • pipeline: FlowRuntime

  • release: FlowRuntime

  • catalogItem: Object

ec-perl usage

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

Example

# for pipeline $cmdr->runTrigger( {projectName => "qe proj", pipelineName => "qe pipeline name", triggerName => "qe trigger 1", webhookData => "test", webhookHeaders => "Test", parsedWebhookData => "\"{\"branch\": \"master\"}\""}); # for procedure $cmdr->runTrigger( {projectName => "qe proj", procedureName => "qe procedure name", triggerName => "qe trigger 1", webhookData => "test", webhookHeaders => "Test", parsedWebhookData => "\"{\"branch\": \"master\"}\""});

ectool usage

Usage: runTrigger [--applicationName <applicationName>] [--catalogItemName <catalogItemName>] [--catalogName <catalogName>] [--parsedWebhookData <parsedWebhookData>] [--path <path>] [--pipelineName <pipelineName>] [--procedureName <procedureName>] [--projectName <projectName>] [--releaseName <releaseName>] [--triggerName <triggerName>] [--webhookData <webhookData>] [--webhookHeaders <webhookHeaders>]

Example

ectool runTrigger --projectName "qe proj" --pipelineName "qe pipeline name" --triggerName "qe trigger 1" --webhookData "test" --webhookHeaders "test" --parsedWebhookData ""{\"branch\":\"master\"}" "

createTriggerErrorDetail

Creates a trigger error detail object.

Arguments

Argument Name Type Description

applicationName

String

The name of the application.

catalogItemName

String

The name of the catalog item.

catalogName

String

The name of the catalog.

errorCode

String

Error code.

errorMessage

String

Error message.

includeDetails

Boolean

True to include details (default is false).

path

String

Property path string. For example, /projects/Default/pipelines/pipe1/triggers/trigger1.

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.

Response

<triggerErrorDetail> <triggerErrorDetailId>5646b0a9-fbe4-11ea-8196-0242b3d47d0f</triggerErrorDetailId> <createTime>2020-09-21T08:27:48.714Z</createTime> <errorMessage>Principal 'sa-test' does not have execute privilege on application process 'deploy'</errorMessage> <lastModifiedBy /> <modifyTime>2020-09-21T08:27:48.714Z</modifyTime> <owner /> <triggerId>46e8decd-f9b3-11ea-aa3c-0242b3d47d0f</triggerId> <webhookHeaders>{"Cookie":"COMMANDER_SESSION_ID=ada22345b71f3b066a352689d5","X-GitHub-Event":"push","Accept":"*/*","Cache-Control":"no-cache","User-Agent":"PostmanRuntime/7.26.5","Connection":"keep-alive","Postman-Token":"80dfb119-01ca-4b19-b365-e11ff18f9730","Host":"localhost","Accept-Encoding":"gzip, deflate, br","Content-Length":"7877","Content-Type":"application/json"}</webhookHeaders> <webhookPayload>{ "ref": "refs/heads/master", "before": "9b56bebb7c5c1d3fcb757101fdfa5be88b1cb954", "after": "af708624005b448ebee7788d57cdfa74cca59197", ... }</webhookPayload> </triggerErrorDetail>

ec-perl usage

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

Example

# for pipeline $ec->createTriggerErrorDetail( {projectName => "qe proj", pipelineName => "qe pipeline name", triggerName => "qe trigger 1", errorCode => "InvalidScript", errorMessage => "Invalid script at line 666", webhookHeaders => "\"{\"test\":\"test\"}\"", webhookPayload => "\"{\"aaa\": \"bbb\"}\""}); # for procedure $ec->createTriggerErrorDetail( {projectName => "qe proj", procedureName => "qe procedure", triggerName => "qe trigger 1", errorCode => "InvalidScript", errorMessage => "Invalid script at line 666", webhookHeaders => "\"{\"test\":\"test\"}\"", webhookPayload => "\"{\"aaa\": \"bbb\"}\""});

ectool usage

Usage: createTriggerErrorDetail [--applicationName <applicationName>] [--catalogItemName <catalogItemName>] [--catalogName <catalogName>] [--errorCode <errorCode>] [--errorMessage <errorMessage>] [--includeDetails <0|1|true|false>] [--path <path>] [--pipelineName <pipelineName>] [--procedureName <procedureName>] [--projectName <projectName>] [--releaseName <releaseName>] [--triggerName <triggerName>] [--webhookHeaders <webhookHeaders>] [--webhookPayload <webhookPayload>]

Example

ectool createTriggerErrorDetail --projectName 'qe proj' --pipelineName 'qe pipeline' --triggerName 'qe trigger 1' --errorCode InvalidScript --errorMessage "Invalid script at line 666" --webhookHeaders "{\"test\":\"test\"}" --webhookPayload "{\"aaa\": \"bbb\"}"

deleteTriggerErrorDetail

Deletes the specified trigger error detail.

Arguments

Argument Name Type Description

triggerErrorDetailId

String

(Required) The id of trigger error detail.

Response

No response.

ec-perl usage

$<object>->deleteTriggerErrorDetail(<triggerErrorDetailId>);

Example

$cmdr->deleteTriggerErrorDetail('5646b0a9-fbe4-11ea-8196-0242b3d47d0f');

ectool usage

Usage: deleteTriggerErrorDetail <triggerErrorDetailId>

Example

ectool deleteTriggerErrorDetail '5646b0a9-fbe4-11ea-8196-0242b3d47d0f'

getTriggerErrorDetails

Retrieves a list of trigger error details.

Arguments

Argument Name Type Description

applicationName

String

The name of the application.

catalogItemName

String

The name of the catalog item.

catalogName

String

The name of the catalog.

includeDetails

Boolean

True to include details (default is false).

path

String

Property path string. For example, /projects/Default/pipelines/pipe1/triggers/trigger1.

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.

Response

<response requestId="1" nodeId="10.30.176.58"> <triggerErrorDetail> <triggerErrorDetailId>7f85706d-1d3b-11ec-95ae-42010a1eb03a</triggerErrorDetailId> <createTime>2021-09-24T13:29:52.119Z</createTime> <errorCode>InvalidScript</errorCode> <errorMessage>Invalid script at line 666</errorMessage> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2021-09-24T13:29:52.119Z</modifyTime> <owner>admin</owner> <triggerId>78394d6d-1d3b-11ec-95ae-42010a1eb03a</triggerId> </triggerErrorDetail> </response>

ec-perl usage

$<object>→getTriggerErrorDetails({<optionals>});

Example

# for pipeline $cmdr->getTriggerErrorDetails( {projectName => "qe proj" pipelineName => "qe pipeline", triggerName => "qe trigger 1"}); # for procedure $cmdr->getTriggerErrorDetails( {projectName => "qe proj" procedureName => "qe procedure", triggerName => "qe trigger 1"});

ectool usage

Usage: getTriggerErrorDetails [--applicationName <applicationName>] [--catalogItemName <catalogItemName>] [--catalogName <catalogName>] [--includeDetails <0|1|true|false>] [--path <path>] [--pipelineName <pipelineName>] [--procedureName <procedureName>] [--projectName <projectName>] [--releaseName <releaseName>] [--triggerName <triggerName>]

Example

ectool getTriggerErrorDetails --projectName 'qe proj' --pipelineName 'qe pipeline' --triggerName 'qe trigger 1'

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.

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.

releaseName

String

The name of the release to run.

actualParameters

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.

catalogItemName

String

Name of the catalog item to invoke.

catalogName

String

Name of the catalog containing the catalog item to invoke.

credentialName

String

A list of the credential to use for impersonation in the format: <credName>=<userName> [<credName>=<userName> …​]].

pipelineName

String

The name of the pipeline to run.

procedureName

String

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

processName

String

The name of the application process to invoke.

Response

<response requestId="1" nodeId="10.30.176.58"> <jobId>11b3b04b-1d3a-11ec-b183-42010a1eb03a</jobId> </response>

ec-perl

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

Pipeline example

# for pipeline $cmdr->setupWebhook( {projectName => "qe proj", triggerName => "qe trigger 1", pipelineName => "qe pipeline name", actualParameter => [{actualParameterName => "ec_action", value =>'create'}, {actualParameterName => "credentialsType", value =>'configuration'}, {actualParameterName => "configuration", value =>'github config'}, {actualParameterName => "insecureSsl", value =>'true'}] });

Procedure example

$cmdr->setupWebhook( {projectName => "qe proj", triggerName => "qe trigger 1", procedureName => "qe procedure name", actualParameter => [{actualParameterName => "ec_action", value =>'create'}, {actualParameterName => "credentialsType", value =>'configuration'}, {actualParameterName => "configuration", value =>'github config'}, {actualParameterName => "insecureSsl", value =>'true'}] });

ectool usage

Usage: setupWebhook [--actualParameter <var1>=<val1> [<var2>=<val2> ...]] [--applicationName <applicationName>] [--catalogItemName <catalogItemName>] [--catalogName <catalogName>] [--credential <credName>=<userName> [<credName>=<userName> ...]] [--path <path>] [--pipelineName <pipelineName>] [--procedureName <procedureName>] [--projectName <projectName>] [--releaseName <releaseName>] [--triggerName <triggerName>]

Pipeline example

ectool setupWebhook --projectName "qe proj" --triggerName "qe trigger name" --pipelineName "qe pipeline name" --actualParameter "ec_action=create" "credentialsType=configuration" "configuration=github config" "insecureSsl=true"

Procedure example

ectool setupWebhook --projectName "qe proj" --triggerName "qe trigger name" --procedureName "qe pipeline name" --actualParameter "ec_action=create" "credentialsType=configuration" "configuration=github config" "insecureSsl=true"