Summary
Run a catalog item.projectNameStringrequiredThe name for the project that must be unique among all projects. catalogNameStringrequiredThe name of the catalog. catalogItemNameStringrequiredThe name of the catalog item. actualParameterArrayoptionalParameters passed as arguments to the procedure or to DSL. credentialReferenceParameterArrayoptionalList of credential parameters with references to existing credentials as parameter values. If the parameter value is a property reference then the credential would be resolved at runtime. credentialArrayoptionalCredentials to be used in the job. formParameterArrayoptionalParameters passed as arguments to the DSL. parsedWebhookDataStringoptionalJSON with parsed webhook data to be set on a pipeline/release/procedure run. scheduleNameStringoptionalName for the schedule; must be unique among all schedules for the project. webhookDataStringoptionalThe webhook data to be set on the pipeline/release/procedure run. webhookHeadersStringoptionalThe webhook headers in JSON format to be set on the pipeline/release/procedure run. |
Usage
Perl
$cmdr->runCatalogItem( "test-projectName", # projectName "test-catalogName", # catalogName "test-catalogItemName" # catalogItemName # optionals );
ectool
ectool runCatalogItem \ "test-projectName" `# projectName` \ "test-catalogName" `# catalogName` \ "test-catalogItemName" `# catalogItemName` \ # optionals
Examples
Authentication contexts
When runCatalogItem
is initiated from a command job step, take into account the following:
-
For DSL-based catalog items, the DSL script is evaluated with principals in the authentication context of the launching job user and the procedure project.
-
For procedure- and plugin-based catalog items, the catalog item procedure is run with principals in the authentication context of the launching job project and the subprocedure project. In this case, the proper privileges must be provided for one of the projects.
Consider this example:
-
A
create-project
procedure, in thetest1
project, with the following command step:ectool createProject $[projName]
-
A
catalogItem1
catalog item, in thetestCatalog
catalog, in thetest2
project, where subproject=test1
, subprocedure=create-project
, and formal parameter isprojName
. -
A
testProcedure
procedure, intest3
project, with a command step:ectool runCatalogItem test2 testCatalog catalogItem1 --actualParameter projName=newProject
Run the procedure: ectool runProcedure test3 --procedureName testProcedure
Result: the run job completes with success, but the runCatalogItem
job fails with the following error:
ectool error [AccessDenied]: None of the principals in this authentication context ('project: test3', 'project: test1') have modify privilege on systemObject 'projects'