Skip to main content
Version: Deploy 22.2

Use predefined steps in rules

Deploy rules enable you to use XML or Jython to specify the steps that belong in a deployment plan and how the steps are configured. Several Deploy plugins include predefined rules that you can use when writing rules. For more information on rules, see Get started with rules.

Predefined steps in standard plugins

The standard Deploy plugins contain the following predefined steps:

  • create-ci: Creates a configuration item (CI) in the Deploy Repository.
  • delete-ci: Deletes a CI from the Deploy Repository.
  • delete: Deletes a file or directory on a remote host.
  • jython: Executes a Python script locally on the Deploy server.
  • manual: Use to incorporate a manual process as part of a deployment.
  • noop: A "dummy" step that does not perform any actions.
  • os-script: Executes a script on a remote host.
  • powershell: Executes a PowerShell script on the remote Microsoft Windows host.
  • template: Generates a file based on a FreeMarker template and uploads the file to a remote host.
  • upload: Copies a udm.Artifact to an overthere.Host.
  • wait: Freezes the deployment plan execution for a specified number of seconds.

For information about step parameters and examples, see Step reference.

Predefined steps in other plugins

Other Deploy plugins can contain predefined steps, for example, the IBM WebSphere Application Server (WAS) plugin contains a wsadmin step that can execute a Python script via the Python terminal of a was.Cell.

For information about predefined steps that are included with other Deploy plugins, see Plugins and integrations for the plugin that you are interested in.

Calculated step parameters

For some predefined steps, Deploy calculates the values of parameters so you do not have to specify them, this includes parameters that are required.

Order of a step

The order parameter of a step is calculated as follows:

  • If the scope is pre-plan, post-plan, or plan, the order is 50.
  • If the scope is deployed and:
    • The operation is CREATE, MODIFY, or NOOP and:
      • The deployed is a udm.Artifact CI, the order is 70.
      • The deployed is not a udm.Artifact CI, the order is 60.
    • The operation is DESTROY and:
      • The deployed is a udm.Artifact CI, the order is 30.
      • The deployed is not a udm.Artifact CI, the order is 40.

For more information, see Steps and steplists in Deploy.

Description of a step

The description parameter of a step is calculated as follows:

  • If the scope is deployed, the description is calculated based on the operation, the name of the deployed, and the name of the container.
  • If the scope is not deployed, the description cannot be calculated automatically and must be specified manually.

Target host

The target-host parameter of a step is calculated as follows:

  • If the scope is deployed and:
    • deployed.container is of type overthere.Host, the target-host is set to deployed.container.
    • deployed.container is of type overthere.HostContainer, the target-host is set to deployed.container.host.
    • deployed.container has a property called host, the value of which is of type overthere.Host, then target-host is set to this value.
  • In other cases, target-host cannot be calculated automatically and must be specified manually.

For more information about overthere CIs, see Remoting Plugin Reference.

Artifact

The artifact parameter of a step is calculated as follows:

  • If the scope is deployed and deployed is of type udm.Artifact, the artifact is set to deployed.
  • In other cases, artifact cannot be calculated automatically and must be specified manually.

Contexts

Some steps have contexts such as freemarker-context, jython-context or powershell-context.

The context of a step is enriched with calculated variables as follows:

  • If the scope is deployed, the context is enriched with a deployed instance that is accessible in a FreeMarker template by name deployed.
  • If the scope is deployed, the context is enriched with a previousDeployed instance that is accessible in a FreeMarker template by name previousDeployed.
  • In other cases, the context is not calculated automatically.

Note: Depending on the operation, the deployed or previousDeployed might not be initialized. For example, if the operation is CREATE, the deployed is set, but previousDeployed is not set.

Note: You can override the default deployed or previousDeployed values by explicitly defining a FreeMarker context. For example:

<freemarker-context>
<previousDeployed>example</previousDeployed>
</freemarker-context>

Create a custom step

If the predefined step types in Deploy do not provide the functionality that you need, you can define custom step types and create rules that refer to them. For more information, see Create a custom step for rules.