CloudBees workflows are DevOps automations that run one or more jobs. Each defined workflow is saved in YAML format in the .cloudbees/workflows
repository directory. Use unique scripts, actions or custom jobs to execute workflow jobs.
Workflow types
There are two types of CloudBees platform workflows.
-
Standard: Use this workflow for build and deployment automations.
-
Staged: Use to organize release activities into stages for end-to-end process management.
Workflow parts
Workflows are comprised of at least one trigger and job.
Triggers are events that start a workflow run. They are displayed in the Trigger section of the visual composer and under the on
object in the code editor.
There are five types of triggers.
-
push
- Starts the workflow based upon a push request. For more information, refer to: -
pull_request
- Starts the workflow based upon a pull request and Git tags. For more information, refer to: -
schedule
- Starts the workflow based upon configured cron schedules. For more information, refer to: -
workflow_dispatch
- Enables users with permission to manually trigger workflow runs via the CloudBees platform UI or API. For details refer to: -
workflow_call
- Enables a workflow to be called to execute as a reusable workflow job. For more information, refer to:-
Reusable workflows for details
-
Configure
workflow_call
trigger for UI setup details .
There are three types of jobs. Each job type can be used in a workflow, but a job can only be one type.
-
Standard: Must contain at least one step with a valid
uses:
entry. -
Reusable workflow job: Calls a workflow by setting
uses:
to the repository path of the reusable workflow yaml file. -
-
A job that executes within a workflow job using the
delegates
object. Refer to jobs.<job_id>.delegates for DSL syntax details.Manual approval is currently the only custom job available. -
Configure a manual approval job to require an approval within a workflow run, refer to:
-
Common workflow keywords
Use the code editor to configure workflow job objects. For additional details related to configuring workflow objects, refer to:
Keyword | Definition |
---|---|
|
Specifies the CloudBees DSL syntax version, for example, |
|
Specifies the kind of CloudBees DSL file, for example, |
|
Use to specify workflow or step name.
|
|
The |
|
Defines a list of local properties.
Each property is a key / value pair.
The location of |
|
A group of steps that run in the workflow. By default, jobs are run in parallel. Also, job usage is limited to 4G memory and 4000m CPU (4 vCPUs). |
|
Use to delegate execution of a workflow job to a custom job. |
|
Steps are activities that occur in series within a workflow job. Containerized custom scripts or action calls are common step examples. Steps execute:
|
|
Configure to specify an action or script to use to execute the step. |
|
Multiple jobs in a workflow can be run sequentially, by specifying the name, in |
|
(Optional) The step ID. Subsequent steps can refer to outputs produced by this step by using its ID, for example, |
|
Specifies the shell used to run a step command. |
|
Specifies a command to run in a step. |
|
Groups all parameters a step uses during execution. Each parameter is a key / value pair. |
|
Groups all job outputs, and makes them available to downstream jobs. Each output is a key / value pair. |
Ensure that your workflow and action code do not execute untrusted input. Use the following recommendations to harden your code against attackers:
|