Run pipelines

4 minute readDeveloper productivity

This section shows how to run a pipeline or restart a failed pipeline run. It also has examples showing different pipeline run scenarios.

You can also use Perl API commands through cb-perl and ectool, REST API commands, and DSL scripts to model and run pipelines. For more information, refer to CloudBees CD/RO APIs].

To run pipelines:

  1. From the CloudBees CD/RO main menu, select Release Orchestration  Pipelines. The Pipelines list displays.

  2. Select the play icon under the Run column corresponding to the pipeline you want to start. Optionally, you can choose a previously run pipeline.

  3. If the pipeline has required parameters to run the pipeline, enter the parameter values. If you are rerunning a pipeline, it uses parameter values from the previous run, or you can provide new values.

  4. View the real-time progress of the pipeline run.

    • Progress is shown in percentage complete.

    • Tasks requiring a response are denoted by the following:

      • Manual response required — Manual attention needed, and you are on the approver’s list.

      • Manual response required and you are an approver — Manual attention needed, and you are not on the approver’s list.

        The following example shows that the entry gate of the DEV stage has gate approvals that require approval before the pipeline can enter the QA stage.

        DEV stage entry gate
        Figure 1. DEV stage entry gate

        Select Response Required to view the gate approvals and the required reviewers.

        Select the hand icon under the Manual column to access the list of required reviewers, in this case, for the DEV stage entry gate.

  5. Click in a stage to view the details of the pipeline stage summary.

    For examples of pipeline stage summaries, refer to Pipeline stage summary.

  6. Select View previous Pipeline Runs to access previous runs of this pipeline.

Start a Pre-run a task

This section details how to start a pre-run task. A pipeline task configured to run before pipeline execution reaches the stage or gate containing that task is a “Pre-run” task. For information about setting up a pre-run task refer to Configure pre-run tasks. Error handling for a pre-run task occurs when the pipeline execution reaches the task.

Before starting a pre-run task, the following conditions must true for the pre-run task and stage or gate containing the task:

  • Pipeline execution has not reached the stage or gate containing the task.

  • All pre-conditions are true.

  • No pending runtime wait dependencies are present.

  • The wait for start date and planned start date requirements are met.

To start a pre-run task:

  1. Access the Pipeline runs screen using one of the following options:

    • From the Release editor or Pipeline editor, select the Pipeline runs tab.

    • Navigate to Release Orchestration  Pipeline Runs. Then select the pipeline name link.

  2. Locate the running pipeline containing the task to be pre-run on the Pipeline run screen.

  3. Select the Pre-run task from the task 3-dots 3-dots menu.

    Pre-run task
    Figure 2. Select pre-run task
    The stage executing a pre-run task is denoted with a multi-colored header. A completed pre-run task is denoted with a dot.

Restart a failed pipeline run

Using the restart capability for failed pipeline runs, you can configure a pipeline run to restart from the last failed task after you update needed task definitions or fix issues that caused the failure. To restart the pipeline, you must have execute privileges on all tasks, rules, and stages after the task that is being restarted, including the failed task itself.

A pipeline run is restartable

  • If the last executed task in the run has a failure outcome, provided its error handling is not configured as Continue on Error. Any prior failed tasks—in the same or previous stages or gates—with Continue on Error error handling enabled are ignored.

  • If the last stage has no tasks in it, and it is in error because of a run condition/precondition evaluation error.

To restart a failed pipeline, select Restart from failure from the pipeline run’s Actions menu. Restarting a pipeline prompts you enter a comment about the restart.

Restart a failed pipeline
Figure 3. Restart a failed pipeline from Actions

Pause or resume a pipeline run

On the Pipeline list or Pipeline runs screens, select the three-dots menu and either Pause run or Resume run to interrupt or restart a pipeline run. When pausing a run, tasks are handled as follows:

  • All running tasks continue until completion.

  • A manual or wait for the precondition task pauses immediately. You can still approve or provide conditions while the pipeline is paused. When approval or conditions are provided, these tasks run to completion, and the pipeline remains paused.

  • A manual retry on error task pauses immediately. You have one of the following options:

    • If the task is paused before retry, you are able to retry the task while the pipeline is paused.

    • If the task is paused after retry, you must select Resume run to receive the retry option.

  • An auto-retry task pauses immediately. You have one of the following options:

    • If you pause the task before an auto-retry attempt, a retry occurs.

    • If you pause the task after an auto-retry, you must select Resume run to restart the auto-retry.

View pipeline run details

You can view the details of a previous pipeline run from the Pipeline runs tab.

To view the details of a previous pipeline run:

  1. Select Pipeline runs.

  2. Select View previous Pipeline Runs to access the previous runs of this pipeline.

    View previous pipeline runs
    Figure 4. Select View previous Pipeline Runs

    The previous pipeline runs display.

    Previous pipeline runs
    Figure 5. Previous pipeline runs displayed
  3. (Optional) To access specific pipeline run details, select the Open Dialog arrow on the right of its row.

View task summary during a pipeline run

You can view task summaries during a pipeline run on the Pipeline runs tab.

To view task summary during a pipeline run:

  1. From the CloudBees CD/RO main menu, select Release Orchestration  Pipelines. The Pipelines list displays.

  2. Select Pipeline runs.

  3. Select the task in the stage. The task summary displays in the stage.

    Task summary displayed during pipeline run
    Figure 6. Task summary in a pipeline run

    For advanced deployment strategies with Argo Rollouts, the summary includes the type of Deployment strategy.

    For more information on advanced deployments with Argo Rollouts, refer to Argo Rollout deployment and delivery.