- Openshift Cluster - You can use https://www.redhat.com/sysadmin/codeready-containers
- Follow Openshift Pipelines Operator installation steps to install Openshift Pipelines
Demo: How easily cronJobs can be converted to Openshift Pipelines
Scenario:
We have the following jobs:
- cronJob to fetch data from a particular source and store it into a PVC.
- cronJob to convert fetched data into CSV
- cronJob to read data from storage
Now let's use the Openshift Pipelines to streamline our cloud workloads.
Note: Demo assumes that he/she has knowledge about Openshift Pipelines and how to execute the resources.
- Demo covers
- How to re-use the tasks
- results
- runAfter (To manage task run)
- when expression(if/else)
- finally(cleanup/removal)
- workspaces(storage)
- params(how data can be passed from one place and used in multiple places)
- Create a project
oc new-project demo
- Create reusable task from hub.tekton.dev
oc create -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/write-file/0.1/write-file.yaml
- create the pipeline and task that are required for the demo
oc create -f https://raw.githubusercontent.com/savitaashture/unicredit/main/examples/pipeline.yaml
- create pipelinerun manually
oc create -f https://raw.githubusercontent.com/savitaashture/unicredit/main/examples/pipelinerun.yaml
-
re-create pipelinerun from console with single click
-
Create pipelinerun dynamically based on some events using
- Pipelines as Code
- Triggers
The final demo looks like below