You can use the Developer perspective of the OpenShift Container Platform web console to create CI/CD pipelines for your software delivery process.

In the Developer perspective:

  • Use the AddPipelinePipeline Builder option to create customized pipelines for your application.

  • Use the AddFrom Git option to create pipelines using operator-installed pipeline templates and resources while creating an application on OpenShift Container Platform.

After you create the pipelines for your application, you can view and visually interact with the deployed pipelines in the Pipelines view. You can also use the Topology view to interact with the pipelines created using the From Git option. You need to apply custom labels to a pipeline created using the Pipeline Builder to see it in the Topology view.

Prerequisites

  • You have access to an OpenShift Container Platform cluster and have switched to the Developer perspective in the web console.

  • You have the OpenShift Pipelines Operator installed in your cluster.

  • You are a cluster administrator or a user with create and edit permissions.

  • You have created a project.

Constructing Pipelines using the Pipeline Builder

In the Developer perspective of the console, you can use the +AddPipelinePipeline builder option to:

  • Configure pipelines using either the Pipeline builder or the YAML view.

  • Construct a pipeline flow using existing tasks and cluster tasks. When you install the OpenShift Pipelines Operator, it adds reusable pipeline cluster tasks to your cluster.

  • Specify the type of resources required for the pipeline run, and if required, add additional parameters to the pipeline.

  • Reference these pipeline resources in each of the tasks in the pipeline as input and output resources.

  • If required, reference any additional parameters added to the pipeline in the task. The parameters for a task are prepopulated based on the specifications of the task.

  • Use the Operator-installed, reusable snippets and samples to create detailed pipelines.

Procedure
  1. In the +Add view of the Developer perspective, click the Pipeline tile to see the Pipeline builder page.

  2. Configure the pipeline using either the Pipeline builder view or the YAML view.

    The Pipeline builder view supports a limited number of fields whereas the YAML view supports all available fields. Optionally, you can also use the Operator-installed, reusable snippets and samples to create detailed Pipelines.

    op pipeline yaml
    Figure 1. YAML view

    Configure your pipeline using the Pipeline Builder:

    1. In the Name field, enter a unique name for the pipeline.

    2. In the Tasks section, select a task from the Select Task list to add a task to the pipeline. In this example, use the s2i-nodejs task.

      • To add sequential tasks to the pipeline, click the plus icon to the right or left of the task, and from the Select Task list, select the task you want to add to the pipeline. For this example, use the plus icon to the right of the s2i-nodejs task to add an openshift-client task.

      • To add a parallel task to the existing task, click the plus icon displayed next to the task, and from the Select Task list, select the parallel task you want to add to the pipeline.

        op pipeline builder
        Figure 2. Pipeline Builder
    3. In the Resources section, click Add Resources to specify the name and type of resources for the pipeline run. These resources are then used by the tasks in the pipeline as inputs and outputs. For this example:

      1. Add an input resource. In the Name field, enter Source, and then from the Resource Type drop-down list, select Git.

      2. Add an output resource. In the Name field, enter Img, and then from the Resource Type drop-down list, select Image.

        A red icon appears next to the task if a resource is missing.

    4. Optional: The Parameters for a task are pre-populated based on the specifications of the task. If required, use the Add Parameters link in the Parameters section to add additional parameters.

    5. In the Workspaces section, click Add workspace and enter a unique workspace name in the Name field. You can add multiple workspaces to the pipeline.

    6. In the Tasks section, click the s2i-nodejs task to see the side panel with details for the task. In the task side panel, specify the resources and parameters for the s2i-nodejs task:

      1. If required, in the Parameters section, add more parameters to the default ones, by using the $(params.<param-name>) syntax.

      2. In the Image section, enter Img as specified in the Resources section.

      3. Select a workspace from the source drop-down under Workspaces section.

    7. Add resources, parameters, and workspaces to the openshift-client task.

  3. Click Create to create and view the pipeline in the Pipeline Details page.

  4. Click the Actions drop-down menu then click Start, to see the Start Pipeline page.

  5. The Workspaces section lists the workspaces you created earlier. Use the respective drop-down to specify the volume source for your workspace. You have the following options: Empty Directory, Config Map, Secret, PersistentVolumeClaim, or VolumeClaimTemplate.

Creating applications with OpenShift Pipelines

To create pipelines along with applications, use the From Git option in the Add view of the Developer perspective. For more information, see Creating applications using the Developer perspective.

Interacting with pipelines using the Developer perspective

The Pipelines view in the Developer perspective lists all the pipelines in a project, along with the following details:

  • The namespace in which the pipeline was created

  • The last pipeline run

  • The status of the tasks in the pipeline run

  • The status of the pipeline run

  • The creation time of the last pipeline run

Procedure
  1. In the Pipelines view of the Developer perspective, select a project from the Project drop-down list to see the pipelines in that project.

  2. Click the required pipeline to see the Pipeline details page.

    By default, the Details tab displays a visual representation of all the all the serial tasks, parallel tasks, finally tasks, and when expressions in the pipeline. The tasks and the finally tasks are listed in the lower right portion of the page. Click the listed Tasks and Finally tasks to view the task details.