Tekton Overview
KubeRocketCI provides Continuous Integration based on Tekton.
Tekton is an open-source Kubernetes native framework for managing pipelines, allowing a user to compile, build and test applications.
Tekton is an open-source Kubernetes native solution, designed for orchestrating complex pipelines that allows users to define pipelines as code. It enables users to compile, build, and test applications seamlessly.
The edp-tekton GitHub repository provides all Tekton implementation logic on the platform. The Helm charts are used to deploy the resources inside the Kubernetes cluster. Tekton logic is decoupled into separate components:

The diagram above describes the following:
-
Common-libraryis the Helm chart of Library type which stores the common logic shareable across all Tekton pipelines. This library contains Helm templates that generate common Tekton resources. -
Pipelines-libraryis the Helm chart of the Application type which stores the core logic for the KubeRocketCI pipelines. Tekton CRs like Pipelines, Tasks, EventListeners, Triggers, TriggerTemplates, and other resources are delivered with this chart. -
EDP Interceptoris the customTekton Interceptorwhich enriches the payload from the VCSs events with the KubeRocketCI data from theCodebaseCustom Resource (CR) specification. These data are used to define the Pipeline logic. -
Custom-pipelinesis the Helm chart of the Application type which implements custom logic running specifically for internal platform development, for example, CI and Release. It also demonstrates the customization flow on the platform.
Inspect the schema below that describes the logic behind the Tekton functionality on the platform:

The platform logic consists of the following:
-
The
EventListenerexposes a dedicated Pod that runs the sink logic and receives incoming events from the VCSs (Gerrit, GitHub, GitLab) through the Ingress. It contains triggers with filtering and routing rules for incoming requests. -
Upon the Event Payload arrival, the
EventListenerruns triggers to process information or validate it via different interceptors. -
The
EDP Interceptorextracts information from thecodebases.v2.edp.epam.comCR and injects the received data into top-level 'extensions' field of the Event Payload. The Interceptor consists of running Pod and Service. -
The
Tekton Cel Interceptordoes simple transformations of the resulting data and prepares them for the Pipeline parameters substitution. -
The
TriggerTemplatecreates a PipelineRun instance with the required parameters extracted from the Event Payload by Interceptors. These parameters are mandatory for Pipelines. -
The
PipelineRunhas a mapping to the platform Tekton Pipelines using a template approach which reduces code duplication. Each Pipeline is designed for a specific VCS (Gerrit, GitLab, GitHub), technology stack (such as Java or Python), and type (code-review, build). -
A
Pipelineconsists of separate Tekton Tasks. They are arranged in a specific order of execution in the Pipeline. -
Each
Taskis executed as a Pod on the Kubernetes cluster. Also, Tasks can have a different number of steps that are executed as a Container in Pod. -
The Kubernetes native approach allows the creation of PipelineRun either with the kubectl tool or using the Portal UI.