Tekton Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 94: Line 94:
* [[Tekton_Operations#Display_Execution_Log_of_a_PipelineRun|Display execution log of a pipelinerun]]
* [[Tekton_Operations#Display_Execution_Log_of_a_PipelineRun|Display execution log of a pipelinerun]]
==Trigger==
==Trigger==
Implemented as part of the [[#Tekton_Trigger|Tekton Triggers]] component.
Implemented as part of the [[#Tekton_Triggers|Tekton Triggers]] component.


=Tekton Components=
=Tekton Components=

Revision as of 23:59, 27 April 2022

Internal

Overview

Tekton is a cloud-native solution for building CI/CD pipelines. Tekton installs and runs as an extension on your Kubernetes cluster and uses the well-established Kubernetes resource model. Tekton workloads execute inside Kubernetes containers. It has several components: Tekton Pipelines, Tekton CLI and Tekton Catalog. Tekton is part of the CD Foundation, a Linux Foundation project. It is implemented as a set of Kubernetes Custom Resources. Once deployed, Tekton can be accessed via Tekton CLI commands or API calls.

Tekton Domain Model

Task

apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: hello
spec:
  steps:
    - name: echo
      image: alpine
      script: |
        #!/bin/sh
        echo "Hello World"

Task Operations

TaskRun

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: hello-task-run
spec:
  taskRef:
    name: hello

TaskRun Operations

Pipeline

apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: task1
spec:
  steps:
    - name: echo
      image: alpine
      script: |
        #!/bin/sh
        echo "this is Task 1 output"
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: task2
spec:
  steps:
    - name: echo
      image: alpine
      script: |
        #!/bin/sh
        echo "this is Task 2 output"
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: simple-pipeline
spec:
  tasks:
    - name: task1
      taskRef:
        name: task1
    - name: task2
      runAfter:
        - task1
      taskRef:
        name: task2

PipelineRun

apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  name: simple-pipeline-run
spec:
  pipelineRef:
    name: simple-pipeline

PipelineRun Operations

Trigger

Implemented as part of the Tekton Triggers component.

Tekton Components

Tekton Pipelines

https://github.com/tektoncd/pipeline/blob/main/docs/README.md

Tekton Pipelines is the foundation of Tekton. It is implemented as a set of Kubernetes Custom Resources.

Tekton Pipeline Operations

Tekton CLI

https://github.com/tektoncd/cli/blob/main/README.md

Tekton CLI provides the command interface called tkn.

Tekton CLI Operations

Tekton API

Tekton APIs are currently available for Pipelines and Triggers allow you to programmatically interact with the Tekton components.

Tekton Catalog

https://github.com/tektoncd/catalog/blob/v1beta1/README.md

Tekton Catalog is a repository of community-contributed Tekton building blocks.

Tekton Hub

https://hub.tekton.dev
https://github.com/tektoncd/hub/blob/main/README.md

Tekton Hub is a web GUI to access Tekton Catalog.

Tekton Triggers

https://github.com/tektoncd/triggers/blob/main/README.md

Tekton Triggers allows instantiating pipelines based on events (a PR merge, etc.)

Tekton Dashboard

https://github.com/tektoncd/dashboard/blob/main/README.md

Tekton Dashboard is the web GUI that displays information about pipeline execution.

Tekton Operator

https://github.com/tektoncd/operator/blob/main/README.md

Tekton Operator is the implementation of the Kubernetes Operator pattern that assists with the operation of the Tekton projects.

Building Block

Tekton documentation refers to "building blocks". Those are ...