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 ec-perl and ectool, REST API commands, and DSL scripts to model and run pipelines. For more information, refer to Introduction.

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.

Pre-run a task

For tasks configured to run without a defined order, you can specify to pre-run a task. Only the specified task runs; execution does not continue to the following tasks and stages. When pipeline run execution reaches a task which has already run, the pre-run task is skipped. If the pre-run task is still running, the pipeline execution waits for it to complete and then continues on to the remaining tasks. A task can be pre-run if:

  • It is configured to run out of order. Refer to Configuring Pre-Run Tasks for more information.

  • All pre-conditions, on both the task itself and a stage/gate containing the task, must evaluate to true.

  • No pending runtime wait dependencies on the task itself or stage/gate containing the task.

  • If configured with wait for start date, the planned start date requirement for stage/gate and task is met.

Error handling on the specified task has no impact on its pre-run execution: the task runs and stops regardless of success or failure. However, when the regular execution reaches a pre-run task that has failed and has error handling defined as:

  • Stop on error: Pipeline execution stops.

  • Continue on error: Pipeline execution continues to the next task.

  • Retry: The task is retried.

To pre-run a task, locate it in the pipeline run, then select Pre-Run Task from the task’s Actions menu.

Select a pre-run task
Figure 2. Selecting pre-run task

A completed pre-run task is denoted with a dot and its containing stage is denoted with a multi-colored header.

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.