第 4 章 Creating CI/CD solutions for applications using OpenShift Pipelines
With Red Hat OpenShift Pipelines, you can create a customized CI/CD solution to build, test, and deploy your application.
To create a full-fledged, self-serving CI/CD Pipeline for an application, you must perform the following tasks:
- Create custom Tasks, or install existing reusable Tasks.
- Create and define the delivery Pipeline for your application.
- Create a PersistentVolumeClaim attached to the Workspace to provide the volume or filesystem for Pipeline execution.
- Create a PipelineRun to instantiate and invoke the Pipeline.
- Add Triggers to capture any events in the source repository.
This section uses the pipelines-tutorial
example to demonstrate the preceding tasks. The example uses a simple application which consists of:
-
A front-end interface,
vote-ui
, with the source code in theui-repo
Git repository. -
A back-end interface,
vote-api
, with the source code in theapi-repo
Git repository. -
The
apply_manifest
andupdate-deployment
Tasks in thepipelines-tutorial
Git repository.
4.1. Prerequisites
- You have access to an OpenShift Container Platform cluster.
- You have installed OpenShift Pipelines using the Red Hat OpenShift Pipelines Operator listed in the OpenShift OperatorHub. Once installed, it is applicable to the entire cluster.
- You have installed OpenShift Pipelines CLI.
-
You have forked the front-end
ui-repo
and back-endapi-repo
Git repositories using your GitHub ID, and have Administrator access to these repositories. -
Optional: You have cloned the
pipelines-tutorial
Git repository.