Summary
Run the specified procedure, return new job ID. If the --pollInterval option is provided, wait until the job completes up to a maximum of --timeout seconds (if also provided). If the --scheduleName option is provided, the parameters provided by that schedule will be used.Two types of credentials can be passed to runProcedure
:
-
Impersonation credentials
-
Credential parameters
Impersonation credentials:
Impersonation credentials are used to set the top-level impersonation credential for a job. If specified, the impersonation credential for the job is used as the default impersonation credential for all steps in the job.
The impersonation credential can be specified in two ways:
-
If the
credentialName
argument is supplied, the job looks for the named credential specified. If the user has Execute permissions on the specified credential,runProcedure
is allowed to start the job. -
If the
userName
andpassword
arguments are supplied, the job creates a transient credential to contain the pair. The transient credential is used by the job and then discarded when the job completes.
Only one of credentialName
or userName
should be specified. If both are specified, only userName
is used. Neither can be specified if the procedure being run already has a credential defined on the procedure or the project.
Credential parameters:
If the procedure defines one or more credential parameters, runProcedure
must specify a credential to use for each parameter. The actualParameter
argument identifies the credential name to use for the parameter, and the credential
argument specifies the username for each defined credential. For each credential specified, runProcedure
prompts for a password.
Credential reference parameters:
If the procedure defines one or more credential reference parameters, that is, a parameter that references a credential from an external credential provider, runProcedure
must specify a credential reference to use for each parameter. The credentialReferenceParameter
argument identifies the reference to the credential name to use for the parameter.
Multiple credential references can be specified by having additional name=value
pairs after the credentialReferenceParameter
arguments. The same credential reference can be specified as the value for more than one actual parameter.
projectNameStringrequiredThe name for the project that must be unique among all projects. actualParameterArrayoptionalParameters passed as arguments to the procedure. credentialNameStringoptionalThe name of the credential argument. 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. destinationProjectStringoptionalThe project that will own the job. parsedWebhookDataStringoptionalJSON with parsed webhook data to be set on a pipeline/release/procedure run. passwordStringoptionalSecret value used to identify the account for a particular user. priorityStringoptionalThe priority of the job. Possible values: "low" , "normal" , "high" , "highest" procedureNameStringoptionalName for the procedure; must be unique within the project. scheduleNameStringoptionalName for the schedule; must be unique among all schedules for the project. userNameStringoptionalUser name under which you wish to login. 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->runProcedure( "test-projectName" # projectName # optionals );
ectool
ectool runProcedure \ "test-projectName" `# projectName` \ # optionals
Examples
Perl
$cmdr->runProcedure("Sample Project", {procedureName => "Delay", actualParameter => {actualParameterName => "Delay Time", value => 10}}); $xpath = $cmdr->runProcedure("BSHTest", {procedureName => "FakeMotoBuild", actualParameter => [ {actualParameterName => "builddir", value => $cwd}, {actualParameterName => "board", value => $board}, {actualParameterName => "myview", value => $cwv}, {actualParameterName => "resourcetouse", value => $resourcetouse}, ]});