Introduction to automation objects

4 minute readDeveloper productivity

CloudBees CD/RO enables software delivery by providing reusable automation objects that represent key aspects of automated delivery systems. These include application, environment, pipeline and release modeling objects. In addition, CloudBees CD/RO has a plugin architecture that enables extending the platform’s functionality and integrating with other tools used in the software development and delivery chain.

Hierarchical view of objects

Table 1. CloudBees CD/RO objects
Object Hierarchy

Projects - Container for modeling objects

Properties and property sheets - like all objects, user-defined properties can be attached - name : value

Credentials - Secure user : password store

Procedures - Sequence of steps

Steps - Definition of actions to be performed against a resource (host with agent installed)

Attached credentials - To access credentials at runtime

Formal Parameters - Input and output parameter definitions

Pipelines - Similar to procedures, but arranged in stages and tasks and do not have a common workspace (each task has its own)

Formal Parameters

Stages - Sequence of tasks and gates

  • Tasks

    • Manual

    • Procedure

    • Plugin

  • Gates

    • Manual

    • Custom (property based)

    • Procedure

    • Plugin

Pipeline Runtime Instance - Runtime instance of a pipeline definition

Stage Runtime Instance

Releases

  • Planned Start time

  • Applications and Environment configuration (attached)

  • Pipeline

    • Deployer

  • Pipeline Runtime

Microservices - Deployment model for microservices

  • Services

  • Microservice Processes

    • Formal Parameters

    • Process Steps

    • Branch Dependencies

Applications - Deployment model for multi-tiered applications

  • App Tiers

  • Components

    • (Artifact References)

    • Component Processes
      -Process Steps
      -Branch dependencies

  • Application Processes (for example, Deploy, Rollback, UnDeploy)

    • Formal Parameters

    • Process Steps

    • Branch Dependencies

  • Environment mappings

Environment - Targets for Application deployments

  • Tiers

  • Clusters

Catalogs - Easy-to-use packaged self-service items to create or run content

Reports- Report database filters

Dashboards

Widgets - Present data filtered by Reports

Jobs - Runtime of procedures

Plugins - Versioned projects used for tool integrations

Configurations - Credentials, connection strings

Resources - Logical references to installed agents running on hosts

Workspaces - Specifications for where job outputs are be stored and accessed

Artifacts- A Maven-like artifacts store

Users- Local or LDAP/AD user definitions

Groups - Local or LDAP/AD groups definitions

Personas - User interface view filtering for different classes of users

In addition to the above, there are several other system administration object types that are not shown here.

Property references

Property references can be used in most entry fields and these references are typically expanded at runtime.

Intrinsic properties (properties defined by the system) and user-defined properties are accessed the same way. As a result, you need to be careful when creating properties and avoid using reserved names (intrinsic property names). Properties are referenced using square-bracket, $[…​] notation, where the content of the square brackets can be one of:

  1. Xpath - for example:

    /projects/A Project/description

    or

    /projects[A Project]/description

  2. Javascript - for example:

    /javascript myProject == "Default" /javascript myJob.PropertySheetName["My Property"] /javascript api.runProcedure({projectName: "My Project", procedureName: "My Procedure"})
    The /javascript content can be multiline.
  3. Increment - for example:

    /increment /myProject/Counter

  4. Timestamp (not an actual property reference) - for example:

    /timestamp YYYY-MM-dd HH:mm:ss+

The path to an object’s properties is according to the object model:

/projects/A Project/procedures/A Procedure/steps/A Step/shell

Shortcuts are provided for ease of use.

/myStep/shell /myProcedure/My Property /myJobStep/outcome /myProcedure/status

User parameters can be attached to any object (actually, its propertySheet). These parameters can be hierarchical. Property sheets are properties without values but can contain properties:

/projects/A Project/My Top Sheet/A Property
/projects/A Project/My Top Sheet/A Subproperty sheet/Another Property /projects/A Project/My Top Sheet/Yet Another property

Parameters can be attached to any runnable object. These (“formalParameters”) can be accessed at runtime (“actualParameters”) with the square-bracket notation, but do not require a path.

For example, compare the parameter

$[anInput]

with these alternatives:

$[/jobs/job_1234/actualParameters/anInput] $[/myJob/actualParameters/anInput] $[/myJob/anInput])

The last example works because actualParameters are also copied to the job property sheet at runtime.

Procedures

Job property reference: $[/myJob/A Property]

To use the command line interface (CLI) to set a property, use the CLI command:

Step 1

ectool setProperty /myJob/aNewProp --value xyz # aNewprop cannot be expanded here because expansion happens before shell execution

Step 2

echo $[/myJob/aNewProp]

Intrinsic property: $[/myJob/outcome] may return success

Pipeline

$[/myPipeline/A Property]

Parameter reference:

$[Input Parameter] $[/myTaskRuntime/outcome]

Alternative:

$[/myTaskRuntime/job/outcome] $[/myStageRuntime/outcome]

A safe way to reference user properties that might have special characters or embedded blanks:

$[/myJob[XYZ ABC]] or $[/myJob[$[A Property Name with spaces]]]

Special properties

User-modified properties that change the behavior of the platform are listed here.

summary or /myJobStep/summary - This can be set to customize the job step status line

/myJob/report-urls/link label - When a property is set on the /myJob/report-urls property sheet to a URL value, a link appears in the Jobs Detail view. The name of the link to the URL value is displayed.

/myStageRuntime/ec_summary/A Property - The property names on the /myStageRuntime/ec_summary will appear in the stage summary as a link to the value of the property, for example, an HTML snippet.

/server - Properties in this property sheet can be edited to modify the CloudBees platform behavior or to access platform values.

Runtime properties

Table 2. Objects and useful properties
Runnable Objects and useful properties Runtime Objects and useful properties

Procedure

/myProcedure

Job

/myJob

/myJobStep

Pipeline

/pipeline

Pipeline Runtime

/myStageRuntime /myPipelineRuntime flowRuntime

Application process

/myApplication

Job

/myJob /myEnvironment /myService /myProcessStep

Release

/myRelease

(Release Started)

Pipeline Runtime

Workflow Definition

/myWorkflowDefintion

-FSM

Workflow

/myWorkflow