Staged workflows

4 minute read

Use staged workflows to organize complex release activities into structured stages, each stage representing a deployment or transition across environments like staging, production, or QA.

Unlike standard workflows, staged workflows enable:

  • Organized release phases*: Break the release into distinct steps such as build, test, and deploy.

  • End-to-end visibility: Manage work across environments using a consistent flow.

  • Better debugging: Understand which stage failed and why, faster.

Standard workflows are best for simple CI/CD tasks. Use staged workflows when your releases span multiple steps, teams, or environments.

Prerequisites

Before creating a staged workflow:

  • Ensure your application has an integrated source repository.

  • If you want to call a deployer workflow from your staged workflow, the application must include one.

    If no deployer exists, CloudBees platform can generate one automatically during staged workflow creation.

Create a staged workflow

To create a new staged workflow:

  1. Go to Applications, and select your Application.

  2. Select Applications  Workflows.

  3. Select Create staged workflow.

If no deployer exists for your application, you’ll be prompted to create one using the assisted creation option. For more details, refer to Deployer workflows.

If the deployer is available, the initial staged workflow presented to the user includes a deployer job in each environment stage.

Assisted deployer workflow creation

CloudBees platform provides an assisted creation experience to help generate a deployer workflow if one doesn’t exist.

Assisted creation checks:

  • For a deployer.yaml workflow file.

  • That the file is on the default branch.

  • That it includes an on.workflow_call trigger with the required parameters: manifest and environment, both of type string.

If a deployer is not present, you’re prompted to make a choice:

  • Select Use the assisted deployer to generate a deployer automatically based on your current application components.

  • Select No, thanks to proceed without a deployer.

Staged workflows render visually in the Workflow composer as stages (icon trophy dark), which you can configure.

Use the composer to:

  • Rename a stage: Select Vertical ellipsis, then select Edit

  • Add a stage: Hover between stages or over lines and select +

  • Delete a stage: Select icon vertical ellipsis dark, and then select Delete

    Add a stage to workflow
    Figure 1. Add a stage to a workflow

Once stages are in place, you can connect jobs and add triggers using the workflow composer visual tool.

Save your staged workflow

To save a workflow in CloudBees platform, commit the YAML file to your repository:

  1. Select Commit.

  2. Enter a Commit message.

  3. (Optional) Select a different branch or initiate a pull request.

  4. Select Commit again to confirm.

Once saved, the staged workflow appears in the Workflows list for your application.

Use the Workflow composer

The Workflow composer provides a visual interface for configuring stages, jobs, approvals, environment variables, and more.

Workflow composer
Figure 2. Workflow composer interface

Use the composer to:

  1. Edit workflow metadata, such as the name and environment variables.

  2. Commit workflow updates (refer to Save your staged workflow).

  3. Add or delete triggers, jobs, and stages.

  4. Collapse or expand stages visually.

  5. Insert approval steps.

  6. Manage execution order between jobs.

Each staged workflow must include at least one trigger, one stage, and one job.

Add and manage triggers

All staged workflows begin with a manual trigger. You can add: - Push-based triggers - Pull request-based triggers - Scheduled triggers

To add a trigger:

  1. In the composer, select Add trigger.

  2. Choose a Type and fill in the fields:

    • Push: Select branches and tags.

    • Pull request: Select base branches.

    • Schedule: Provide a CRON expression.

  3. Select Save, and then commit your changes.

For guidance on available triggers, refer to Manage workflows.

Add and manage jobs

Each stage contains jobs. You can add standard or reusable workflow jobs.

  1. In the composer, find the stage you want to update.

  2. Select Add job.

  3. Choose a Job type:

    • Standard job: Basic CI/CD logic

    • Reusable workflow call: Points to another workflow, such as deploy.yaml

  4. Fill out the required configuration.

  5. Select Save, and then commit the updates.

Run a staged workflow

To manually run a staged workflow:

  1. Navigate to Applications, select your Application, and open the Workflows tab.

  2. Select the name of the staged workflow.

  3. Select the Branch to run.

  4. Select Run.

Run a staged workflow
Figure 3. Run a staged workflow

The primary intended use of staged workflows is within a release (refer to Releases). A staged workflow can be run as a standalone workflow, but it requires specific input parameters. By default, a staged workflow is configured to run as a reusable workflow and expects a manifest input parameter containing valid JSON, usually provided by a release manifest.

You can also run staged workflows using configured triggers. Executions are shown in Run details.

Update a staged workflow

To make changes to a staged workflow:

  1. From Applications  Workflows, select the staged workflow you want to edit.

  2. Select Edit to open the composer.

  3. Modify any settings, jobs, triggers, or stages as needed.

  4. Select Commit to save and apply changes.

Update a staged workflow
Figure 4. Update a staged workflow

Delete a staged workflow

To delete a staged workflow:

  1. Open the staged workflow from Applications  Workflows.

  2. Select Ellipsis, and then select Delete.

  3. Confirm the deletion in the dialog.

Delete a staged workflow
Figure 5. Delete a staged workflow

Deleted workflows are removed from both the application UI and repository.