/triggers

Event triggering with Tekton!

Primary LanguageGoApache License 2.0Apache-2.0

Tekton Triggers

Go Report Card

Tekton Triggers logo (Tekton cat playing with a ball)

Triggers is a Kubernetes Custom Resource Definition (CRD) controller that allows you to extract information from events payloads (a "trigger") to create Kubernetes resources. If you are looking to start with triggers please take a look at the getting started guide.

The contents of this repo originated from implementing this design (visible to members of the Tekton mailing list).

Background

Tekton is a Kubernetes-native, continuous integration and delivery (CI/CD) framework that enables you to create containerized, composable, and configurable workloads declaratively through CRDs. Naturally, CI/CD events contain information that should:

  • Identify the kind of event (GitHub Push, GitLab Issue, Docker Hub Webhook, etc.)
  • Be accessible from and map to particular pipelines (Take SHA from payload to use it in pipeline X)
  • Deterministically trigger pipelines (Events/pipelines that trigger pipelines based on certain payload values)

The Tekton API enables functionality to be separated from configuration (e.g. Pipelines vs PipelineRuns) such that steps can be reusable, but it does not provide a mechanism to generate the resources (notably, PipelineRuns and PipelineResources) that encapsulate these configurations dynamically. Triggers extends the Tekton architecture with the following CRDs:

  • TriggerTemplate - Templates resources to be created (e.g. Create PipelineResources and PipelineRun that uses them)
  • TriggerBinding - Validates events and extracts payload fields
  • EventListener - Connects TriggerBindings and TriggerTemplates into an addressable endpoint (the event sink). It uses the extracted event parameters from each TriggerBinding (and any supplied static parameters) to create the resources specified in the corresponding TriggerTemplate. It also optionally allows an external service to pre-process the event payload via the interceptor field.
  • ClusterTriggerBinding - A cluster-scoped TriggerBinding

Using tektoncd/triggers in conjunction with tektoncd/pipeline enables you to easily create full-fledged CI/CD systems where the execution is defined entirely through Kubernetes resources.

You can learn more by checking out the docs

Want to start using Tekton Triggers

Install Triggers, check out the installation guide, examples or follow the getting started guide to become familiar with the project. The getting started guide walks through setting up an end-to-end image building solution, which will be triggered from GitHub push events.

Read the docs

Version Docs Examples Getting Started
HEAD Docs @ HEAD Examples @ HEAD Getting Started @ HEAD
v0.11.1 Docs @ v0.11.1 Examples @ v0.11.1 Getting Started @ v0.11.1
v0.11.0 Docs @ v0.11.0 Examples @ v0.11.0 Getting Started @ v0.11.0
v0.10.2 Docs @ v0.10.2 Examples @ v0.10.2 Getting Started @ v0.10.2
v0.10.1 Docs @ v0.10.1 Examples @ v0.10.1 Getting Started @ v0.10.1
v0.10.0 Docs @ v0.10.0 Examples @ v0.10.0 Getting Started @ v0.10.0
v0.9.1 Docs @ v0.9.1 Examples @ v0.9.1 Getting Started @ v0.9.1
v0.9.0 Docs @ v0.9.0 Examples @ v0.9.0 Getting Started @ v0.9.0
v0.8.1 Docs @ v0.8.1 Examples @ v0.8.1 Getting Started @ v0.8.1
v0.8.0 Docs @ v0.8.0 Examples @ v0.8.0 Getting Started @ v0.8.0
v0.7.0 Docs @ v0.7.0 Examples @ v0.7.0 Getting Started @ v0.7.0
v0.6.1 Docs @ v0.6.1 Examples @ v0.6.1 Getting Started @ v0.6.1
v0.6.0 Docs @ v0.6.0 Examples @ v0.6.0 Getting Started @ v0.6.0
v0.5.0 Docs @ v0.5.0 Examples @ v0.5.0 Getting Started @ v0.5.0
v0.4.0 Docs @ v0.4.0 Examples @ v0.4.0 Getting Started @ v0.4.0
v0.3.1 Docs @ v0.3.1 Examples @ v0.3.1 Getting Started @ v0.3.1
v0.3.0 Docs @ v0.3.0 Examples @ v0.3.0 Getting Started @ v0.3.0
v0.2.1 Docs @ v0.2.1 Examples @ v0.2.1 Getting Started @ v0.2.1
v0.1.0 Docs @ v0.1.0 Examples @ v0.1.0 Getting Started @ v0.1.0

Want to contribute

Hooray!