attachParameter
Attaches a formal parameter to a step. Attaching a parameter allows a step to use the credential (passed in a parameter) as an actual parameter to a subprocedure call or directly in a getFullCredential
call in a command step.
The attachParameter command in CloudBees CD/RO 6.0 and newer releases is not compatible with previous CloudBees CD/RO releases.
|
Arguments
Argument Name | Type | Description |
---|---|---|
projectName |
String |
(Required) The name for the project that must be unique among all projects. |
procedureName |
String |
(Required) The name of the procedure. |
stepName |
String |
(Required) The name of the step in the procedure. |
formalParameterName |
String |
(Required) Name for this parameter; used when the procedure is invoked to specify a value for the parameter. |
applicationName |
String |
The name of the application. |
componentApplicationName |
String |
The name of the component in the application. |
componentName |
String |
The name of the component. |
gateType |
GateType |
The type of the gate. |
microserviceApplicationName |
String |
The name of the microservice application. |
microserviceName |
String |
The name of the microservice. |
pipelineName |
String |
The name of the pipeline. |
processName |
String |
The name of the process. |
processStepName |
String |
The name of the step in the process. |
releaseName |
String |
The name of the release, if attaching a credential to a release pipeline. |
stageName |
String |
Name of the stage to which this task belongs to. |
stateDefinitionName |
String |
The name of the workflow state definition, if attaching a parameter to a state definition. |
taskName |
String |
The name of the task. |
workflowDefinitionName |
String |
The name of the workflow definition, if attaching a parameter to a workflow state definition. |
createActualParameter
Creates a new actual parameter for a step that calls a nested procedure. The parameter is passed to the nested procedure when the step runs. At runtime, the actual parameter name must match the name of a formal parameter in the nested procedure.
Passing Actual Parameters
You can use actual parameters in three types of API calls:
-
calling
runProcedure
to start a new job -
setting up a schedule
-
creating or modifying a subprocedure step
For example, when you call runProcedure
using ectool, set the actual parameters to the procedure on the command line using the optional argument --actualParameter
, followed by a list of name/value pairs. The following is an example of calling a procedure named MasterBuild:
ectool runProcedure "project A" --procedureName "MasterBuild"
--actualParameter Branch=main Type=Debug`
To make this call using the Perl API, define a list. Each element of the list is an anonymous hash reference that specifies one of the actual parameters. Now you can pass a reference to the list as the value of the actualParameter
argument.
Here is the same example called via the Perl API:
# Run the procedure $xPath = $cmdr\->runProcedure("project A", {procedureName => "MasterBuild", actualParameter => [ {actualParameterName => 'Branch', value => 'main'}, actualParameterName => 'Type', value => 'Debug'}, ]});
Specifying most arguments to the createStep
API in Perl is fairly intuitive; like any other API, you specify key-value pairs in a hash argument for all optional parameters. However, specifying actual parameters is more involved because actual parameters are not arbitrary key-values characterizing the step. Instead, they are key-values characterizing actual parameters to the step. See the following createStep
request in XML:
<createStep> <projectName>MyProject</projectName> <procedureName>MyProcedure</procedureName> <stepName>Step1</stepName> <actualParameter> <actualParameterName>parm1</actualParameterName> <value>myval</value> </actualParameter> <actualParameter> <actualParameterName>parm2</actualParameterName> <value>val2</value> </actualParameter> </createStep>
Each actual parameter key-value is under an <actualParameter>
element. Code this in the optional arguments hash in the Perl API like this:
{ ..., => ..., actualParameter => [{actualParameterName => 'parm1', value => 'myval'}, {actualParameterName => 'parm2', value => 'val2'}], ... => ...}
In other words, the value of the actualParameter
key in the optional arguments hash is a list of hashes, each representing one actual parameter. If the sub-procedure call takes only one actual parameter, the value of the actualParameter
key can be specified as just the hash representing the one parameter:
actualParameter => {actualParameterName => 'parm1', value => 'myval'}
Arguments
Argument Name | Type | Description |
---|---|---|
projectName |
String |
(Required) The name for the project that must be unique among all projects. |
procedureName |
String |
(Required) The name of the procedure. |
stepName |
String |
(Required) The name of the step. |
actualParameterName |
String |
(Required) The name of the parameter to create/modify/delete. |
applicationName |
String |
The name of the application, if the actual parameter is on an application process step. |
archiveConnectorName |
String |
The name of the archive connector. |
catalogItemName |
String |
The name of the catalog item. |
catalogItemRunId |
String |
The ID of the catalog item run, if the actual parameter is on a catalog item run. |
catalogName |
String |
The name of the catalog. |
componentName |
String |
The name of the component, if the actual parameter is on a component process step. |
dashboardName |
String |
The name of the dashboard. |
flowName |
String |
The name of the flow to which the flow state belongs to. |
flowStateName |
String |
The name of the flow state, if the formal parameter is on a flow state. |
pipelineName |
String |
The name of the pipeline. |
processName |
String |
The name of the process, if the actual parameter is on a process step. |
processStepName |
String |
The name of the process step, if the actual parameter is on a process step. |
releaseName |
String |
The name of the release, if the actual parameter is on a release. |
scheduleName |
String |
The name of the schedule. |
stateDefinitionName |
String |
The name of the state definition. |
tierMapName |
String |
The name of the tier map. |
transitionDefinitionName |
String |
The name of the state definition. |
triggerName |
String |
The name of the trigger. |
value |
String |
The value of the actual parameter, if creating or modifying. |
widgetName |
String |
The name of the widget. |
workflowDefinitionName |
String |
The name of the workflow definition. |
createFormalOutputParameter
Creates a new formal output parameter.
Arguments
Argument Name | Type | Description |
---|---|---|
projectName |
String |
(Required) The name for the project that must be unique among all projects. |
formalOutputParameterName |
String |
(Required) Name for this parameter; used when the procedure is invoked to specify a value for the parameter. |
applicationName |
String |
The name of the application, if the formal output parameter is on an application process. |
description |
String |
Comment text describing this object that is not interpreted at all by CloudBees CD/RO. |
pipelineName |
String |
The name of the pipeline, if the formal output parameter is on a pipeline. |
procedureName |
String |
The name of the procedure. |
processName |
String |
The name of the process, if the formal output parameter is on a process. |
releaseName |
String |
The name of the release, where pipeline is located. |