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:
-
From the CloudBees CD/RO main menu, select
. The Pipelines list displays. -
Select the play icon under the Run column corresponding to the pipeline you want to start. Optionally, you can choose a previously run pipeline.
-
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.
-
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 attention needed, and you are on the approver’s list.
-
— 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.
Figure 1. DEV stage entry gateSelect 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.
-
-
-
Click in a stage to view the details of the pipeline stage summary.
For examples of pipeline stage summaries, refer to Pipeline stage summary.
-
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
andplanned start date
requirements are met.
To start a pre-run task:
-
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
. Then select the pipelinename
link.
-
-
Locate the running pipeline containing the task to be pre-run on the Pipeline run screen.
-
Select the Pre-run task from the task 3-dots menu.
Figure 2. Select pre-run taskThe 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.
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:
-
Select Pipeline runs.
-
Select a pipeline
name
link. -
Select View previous Pipeline Runs to access the previous runs of this pipeline.
Figure 4. Select View previous Pipeline RunsThe previous pipeline runs display.
Figure 5. Previous pipeline runs displayed -
(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:
-
From the CloudBees CD/RO main menu, select
. The Pipelines list displays. -
Select a pipeline
name
link. -
Select Pipeline runs.
The Expand latest run by default toggle is enabled by default, indicated by its blue color. When enabled, the most recent pipeline run is expanded, displaying stages and run details. To disable this option, select the toggle, which will change its color to gray.
-
Select the Summary link within the task in the stage. The task summary displays in a pop-up.
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.