triggers

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2019 License: Apache-2.0

README

Tekton Triggers

Triggers is a Kubernetes Custom Resource Defintion (CRD) controller that allows you to extract information from events payloads (a "trigger") to create Kubernetes resources.

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 seperated 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.

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. This repo draws inspiration from Tekton, but can used stand alone since TriggerTemplates can create any Kubernetes resource.

You can learn more by checking out the docs

Want to start using Tekton Triggers

Check out the 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.

Want to contribute

Hooray!

Directories

Path Synopsis
cmd
pkg
apis/triggers/v1alpha1
Package v1alpha1 contains API Schema definitions for the triggers v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/tektoncd/triggers/pkg/apis/triggers +k8s:defaulter-gen=TypeMeta +groupName=tekton.dev
Package v1alpha1 contains API Schema definitions for the triggers v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/tektoncd/triggers/pkg/apis/triggers +k8s:defaulter-gen=TypeMeta +groupName=tekton.dev
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/triggers/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/triggers/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL