Skip to content

Tekton library for EDP pipelines. EDP Interceptor that enriches payload from VCS with EDP entities

License

Notifications You must be signed in to change notification settings

daniil-nedostup/edp-tekton

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codecov

EDP Tekton

The edp-tekton repository consolidates elements for Tekton integration with KubeRocketCI (former EPAM Delivery Platform (EDP)). and disposes of two main components:

  • EDP Interceptor. Follows Tekton Interceptor paradigm and enriches payload from different Version Control Systems (VCS) like Gerrit, GitHub or GitLab with the platform specific metadata.
  • Tekton Pipelines. Consists of Tekton Tasks, Pipelines, Triggers and implements KubeRocketCI Pipelines logic. Some of the tasks are forks from origin source, the others are platform specific.

EDP Interceptor

EDP Interceptor is used as a component that provides KubeRocketCI metadata for Tekton Pipelines. The code is based on Upstream implementation.

EDP Interceptor extracts information from VCS payload, like repository_name. The repository_name has 1-2-1 mapping with the KubeRocketCI Codebase (kind: Codebase; apiVersion:v2.edp.epam.com/v1). Interceptor populates Tekton Pipelines with Codebase SPEC data, see the diagram below:

    ┌────────────┐              ┌─────────────────┐       ┌─────────────┐
    │            │              │ EDP Interceptor │       │   Tekton    │
    │  VCS(Git)  ├──────────────►                 ├───────►             │
    │            │              │                 │       │  Pipelines  │
    └──────┬─────┘              └────────┬────────┘       └─────────────┘
           │                             │
    ┌──────┴─────┐                       │ extract
    │    Repo    │                       │
    │            │                       │
    │            │      ┌────────────────▼───────────────┐
    └────────────┘      │ apiVersion: v2.edp.epam.com/v1 │
                        │ kind: Codebase                 │
                        │                                │
                        │ spec:                          │
                        └────────────────────────────────┘

The data, retrieved from the Codebase SPEC, is used in Tekton Pipelines logic. The docker images for Interceptor are available on the DockerHub. The helm-chart for interceptor deployment is in the same repository by the charts/interceptor directory.

Tekton Pipelines

Tekton Pipelines supports three VCS: Gerrit, GitHub, GitLab. To check the VCS Import strategy, please refer to the KubeRocketCI Documentation).

Tekton Pipelines are implemented and packaged using the helm-chart approach. The helm-chart contains:

  • Tasks - basic building block for Tekton. Some of the tasks are forks from Upstream Tekton Catalog.
  • Pipelines, which consist of Tasks and implement logic for the CI flow. KubeRocketCI follows the below approach for pipelines definition:
    • Each type of VCS has its own Pipelines, e.g. for Gerrit, GitHub, GitLab;
    • KubeRocketCI has two types of Pipelines: CodeReview - triggers on Review, Build - triggers on Merged Event.
  • Triggers, TriggerBindings, TriggerTemplates - defines the logic for specific VCS Events (Gerrit, GitHub, GitLab) and Pipelines.
  • Resources - Kubernetes resources, that are used from Pipelines, e.g. ServiceAccount with IRSA Enablement, ConfigMaps for Maven/Gradle Pipelines, Tekton cache, CodeNarc, CTLint, and PVC to share resources between Tasks.
  • Tekton Pipeline pruner - created as a cron job, it is designed to clear outdated pipelines.

About

Tekton library for EDP pipelines. EDP Interceptor that enriches payload from VCS with EDP entities

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 62.7%
  • Go 33.5%
  • Smarty 1.6%
  • Makefile 1.4%
  • Other 0.8%