If you chose to create a step using the Plugin link, additional help is available in the Parameters section by selecting the ? icon. The Parameter section is populated according to the type you chose to create. Different step types require different information. |
To create a new command or subprocedure step
Enter information into the fields as follows:
Field Name | Description | ||
---|---|---|---|
General section (for all step types) |
|||
Name |
Enter a name for the step that must be a unique name within the procedure. |
||
Description |
(Optional) Plain text or HTML description for this object. If using HTML, you must surround your text with
|
||
Command section (for command steps only) |
|||
Command(s) |
A script to execute the step functions that is passed to the step’s shell for execution. |
||
Resource |
Enter a unique resource or resource pool name or click Browse to select a resource. If you leave this field blank, the procedure or project provides a default resource.
|
||
Postprocessor |
If this field is empty, no postprocessor runs for the step. If this field is not empty, it specifies a command that is passed to the step’s shell for execution, analyzes the log file for the step, and collects diagnostic information for reporting. For more information, refer to Postprocessors: Collecting Data for Reports. |
||
Subprocedure section (for subprocedure steps only) |
|||
Procedure |
Displays the current project and procedure. Select Change to use the pop-up menu to select a new project or procedure. |
||
Resource |
Enter a unique resource name or click Browse to select a resource. If you leave this field blank, the procedure or project provides a default resource. |
||
Parameters section (for subprocedure steps only) This section expands automatically, entering the fields you need specifically for the Subprocedure you chose in the previous section. For additional help with field descriptions, select the ? icon, if available. To toggle between the standard view and property view for this section, select the switch view icon. This icon appears in the standard form when one or more of the parameter types are not Text entry or Text area. It appears in the custom form for all the supported parameter types when the form has at least one parameter. |
|||
Advanced section (for both command and subprocedure steps) |
|||
Precondition |
By default, if this field is blank, the step has no precondition and will run when scheduled. Set this property to make a step wait until one or more dependent conditions are met. When a job step is eligible to transition from pending to runnable, a precondition is evaluated. A precondition is a fixed text or text embedding property reference that is evaluated to TRUE or FALSE. An empty string, a \"0\" or \"false\" is interpreted as FALSE. Any other result string is interpreted as TRUE. The step will block until the precondition is TRUE. You cannot use timestamps in preconditions on any object that supports preconditions. This includes stages, gates, and tasks as well as procedures and process steps.
Precondition example: Assume we defined these 4 steps:
Step 1 is an ordinary serial step. Steps 2 and 3 can run in parallel because they depend only on step 1’s completion. Step 4 depends on step 2, but not step 3. You can achieve optimal step execution order with preconditions:
|
||
Run Condition |
By default, if this field is blank the step will always run. This field accepts "fixed text" or text embedding property references that are evaluated into a logical TRUE or FALSE. A "0" or "false" is interpreted as FALSE. An empty string or any other result is interpreted as TRUE. The property reference can be a JavaScript expression, for example, this expression could test whether the name of a step is equal to the value of a property called "restartStep". |
||
Error handling |
This field determines what happens to the procedure if the step fails. The first choice, "procedure continues, but overall status will be error" means an error in the step does not abort the procedure; subsequent steps will run as usual. However, an error will be reflected in the overall outcome of the procedure. If this is the top-level procedure in the job, the job will have an error outcome. If this is a subprocedure, the step invoking the subprocedure will have an error outcome, which still could cause the job to abort, depending on the error handling for that step. The second choice for this field is "abort procedure but allow running steps to continue." In this case, if an error occurs, no new steps are initiated in this procedure except those where "always run" was selected. Any steps currently running are allowed to complete, then the procedure will abort and its outcome will be set to error as described previously. Six error handling options are:
|
||
Time Limit |
The maximum amount of time the step can execute. If the step exceeds this time, it will be aborted. Specify a number and then use the pull-down menu to select the "time units" of the number you specified. |
||
Run in parallel |
If this box is "checked," this step will run concurrently with any adjacent steps marked as parallel. If this box is not checked, the step will NOT run until all previous steps in the procedure have completed, and it will complete before any following steps execute. |
||
Always run step |
If a procedure is aborted (either because of an error in a step or because the job was aborted), under normal conditions no new steps will start in the procedure. However, if this box is "checked," the step will run even if the procedure is aborted. This facility is most commonly used for steps at the end of a job that generate reports or perform cleanup operations.
|
||
Retain Exclusive |
Select one of the following options:
|
||
Workspace |
Use this field to define a workspace for the step to use. You can either type-in a workspace name or click Browse to select a workspace. If you leave this field blank, the workspace is determined by the procedure or project. |
||
Broadcast |
"Checking" this box means replicate the step to execute (in parallel) on each of the specified resources (for example, if a resource pool is specified, run the step on each resource in the pool). |
||
Release Exclusive |
Select one of the following options:
|
||
This shell will be used to execute the step’s commands on a resource. For example, using
When the agent parses the shell, it will parse the extension as everything after
|
|||
Working Directory |
The directory where the commands for this step execute. A relative name is interpreted relative to the root directory for the job workspace. If you leave this field blank, the step’s working directory will be the top-level directory in the job workspace. If this step will run on a proxy resource, this directory must exist on the proxy target. The step will run in this directory on the proxy target. |
||
Log File |
The step’s log file name, specified relative to the root directory in the job workspace. If you leave this field blank, CloudBees CD/RO picks a unique name for the log file based on the step name. |
||
Credential Project |
By default, the Current project is used, or click Browse and select a different project. |
||
Credential Name |
If you select a credential in this field, the step runs under the account from that credential. This field is usually empty, which means a default credential is used. For more detailed information about credentials, refer to Credentials and user impersonation. |
Select OK to create the step.
To edit an existing command or subprocedure step
You can modify any of your previously entered step information and add information to one or all of the four additional sections.
Attached Credentials
Select Attach Credential to retrieve an existing credential for this step. If you need to create a new attached credential, return to the Project Details page for this step.
Attached Parameter Credentials
Select Attach Parameter Credential to retrieve an existing parameter credential for this step.
Email Notifiers
Choose Create On Start Email Notifier or Create On Completion Email Notifier to go the respective page to create the email notifier you need.
Custom Step Properties
Choose from the Create Property, Create Nested Property, or Access Control links to add a custom property to this step. Each Property pop-up box has its own Help topic or go to the main Properties Help topic for more information. For more information about Access Control, go to the main Access control Help topic.
Select OK to save your modified step information.