You can use the Developer perspective of the OKD web console to create CI/CD Pipelines for your software delivery process.
In the Developer perspective:
Use the Add → Pipeline → Pipeline Builder option to create customized Pipelines for your application.
Use the Add → From Git option to create Pipelines using operator-installed Pipeline templates and resources while creating an application on OKD.
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.
In the Developer perspective of the console, you can use the +Add → Pipeline → Pipeline 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.
In the +Add view of the Developer perspective, click the Pipeline tile to see the Pipeline builder page.
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.
To configure your pipeline using the Pipeline Builder:
Enter a unique name for the pipeline.
Select a task from the Select Task list to add a task to the pipeline. This example uses 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.
Click Add Resources to specify the name and type of resources that the pipeline run will use. These resources are then used by the tasks in the pipeline as inputs and outputs. For this example:
Add an input resource. In the Name field, enter
Source, and then from the Resource Type drop-down list, select Git.
Add an output resource. In the Name field, enter
Img, and then from the Resource Type drop-down list, select Image.
Optional: The Parameters for a task are prepopulated based on the specifications of the task. If required, use the Add Parameters link to add additional parameters.
If a Missing Resources warning is displayed on a task if the resources for the task are not specified. 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:
In the Input Resources → Source section, the Select Resources drop-down list displays the resources that you added to the pipeline. For this example, select Source.
In the Output Resources → Image section, click the Select Resources list, and select Img.
If required, in the Parameters section, add more parameters to the default ones, by using the
Similarly, add an input resource for the openshift-client task.
Click Create to create and view the pipeline in the Pipeline Details and the click the Action button to start the pipeline.
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.
The Pipelines view in the Developer perspective lists all the Pipelines in a project along with details, such as the namespace in which the Pipeline was created, the last PipelineRun, the status of the Tasks in the PipelineRun, the status of the PipelineRun, and the time taken for the run.
In the Pipelines view of the Developer perspective, select a project from the Project drop-down list to see the Pipelines in that project.
Click the required Pipeline to see the Pipeline Details page. This page provides a visual representation of all the serial and parallel Tasks in the Pipeline. The Tasks are also listed at the lower right of the page. You can click the listed Tasks to view Task details.
Optionally, in the Pipeline Details page:
Click the YAML tab to edit the YAML file for the Pipeline.
Click the Pipeline Runs tab to see the completed, running, or failed runs for the Pipeline. You can use the Options menu to stop a running Pipeline, to rerun a Pipeline using the same parameters and resources as that of the previous Pipeline execution, or to delete a PipelineRun.
Click the Parameters tab to see the parameters defined in the Pipeline. You can also add or edit additional parameters as required.
Click the Resources tab to see the resources defined in the Pipeline. You can also add or edit additional resources as required.
After you create a Pipeline, you need to start it to execute the included Tasks in the defined sequence. You can start a Pipeline Run from the Pipelines view, Pipeline Details page, or the Topology view.
To start a Pipeline using the Pipelines view:
In the Pipelines view of the Developer perspective, click the Options menu adjoining a Pipeline, and select Start.
The Start Pipeline dialog box displays the Git Resources and the Image Resources based on the Pipeline definition.
For Pipelines created using the From Git option, the Start Pipeline dialog box also displays an
If you have resources in your namespace, the Git Resources and the Image Resources fields are prepopulated with those resources. If required, use the drop-downs to select or create the required resources and customize the Pipeline Run instance.
Optional: Modify the Advanced Options to add credentials to authenticate the specified private Git server or Docker registry.
Under Advanced Options, click Show Credentials Options and select Add Secret.
In the Create Source Secret section, specify the following:
A unique Secret Name for the secret.
In the Designated provider to be authenticated section, specify the provider to be authenticated in the Access to field, and the base Server URL.
Select the Authentication Type and provide the credentials:
For the Authentication Type
Image Registry Crendentials, specify the Registry Server Address that you want to authenticate, and provide your credentials in the Username, Password, and Email fields.
Select Add Credentials if you want to specify an additional Registry Server Address.
For the Authentication Type
Basic Authentication, specify the values for the UserName and Password or Token fields.
For the Authentication Type
SSH Keys, specify the value for the SSH Private Key field.
Select the check mark to add the secret.
You can add multiple secrets based upon the number of resources in your Pipeline.
Click Start to start the PipelineRun.
The Pipeline Run Details page displays the Pipeline being executed. After the Pipeline starts, the Tasks and Steps within each Task are executed. You can:
Hover over the Tasks to see the time taken for the execution of each Step.
Click on a Task to see logs for each of the Steps in the Task.
Click the Logs tab to see the logs according to the execution sequence of the Tasks and use the Download button to download the logs to a text file.