|
1 | 1 | # Tekton Triggers
|
2 |
| -Triggers is a Kubernetes [Custom Resource Defintion](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) (CRD) controller that allows you to extract information from events payloads (a "trigger") to create Kubernetes resources. |
3 | 2 |
|
4 |
| -The contents of this repo originated from implementing [this design](https://docs.google.com/document/d/1fngeNn3kGD4P_FTZjAnfERcEajS7zQhSEUaN7BYIlTw/edit#heading=h.iyqzt1brkg3o) |
5 |
| -(visible to members of [the Tekton mailing list](https://github.com/tektoncd/community/blob/master/contact.md#mailing-list)). |
| 3 | +Triggers is a Kubernetes |
| 4 | +[Custom Resource Defintion](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) |
| 5 | +(CRD) controller that allows you to extract information from events payloads (a |
| 6 | +"trigger") to create Kubernetes resources. |
| 7 | + |
| 8 | +The contents of this repo originated from implementing |
| 9 | +[this design](https://docs.google.com/document/d/1fngeNn3kGD4P_FTZjAnfERcEajS7zQhSEUaN7BYIlTw/edit#heading=h.iyqzt1brkg3o) |
| 10 | +(visible to members of |
| 11 | +[the Tekton mailing list](https://github.com/tektoncd/community/blob/master/contact.md#mailing-list)). |
6 | 12 |
|
7 | 13 | ## Background
|
8 |
| -[Tekton](https://github.com/tektoncd/pipeline) is a **Kubernetes-native**, continuous integration and delivery (CI/CD) framework that enables you to create containerized, composable, and configurable workloads declaratively through CRDs. |
9 |
| -Naturally, CI/CD events contain information that should: |
10 |
| -- Identify the kind of event (GitHub Push, Gitlab Issue, Docker Hub Webhook, etc.) |
11 |
| -- Be accessible from and map to particular pipelines (Take SHA from payload to use it in pipeline X) |
12 |
| -- Deterministically trigger pipelines (Events/pipelines that trigger pipelines based on certain payload values) |
13 | 14 |
|
14 |
| -The Tekton API enables functionality to be seperated from configuration (e.g. [Pipelines](https://github.com/tektoncd/pipeline/blob/master/docs/pipelines.md) vs [PipelineRuns](https://github.com/tektoncd/pipeline/blob/master/docs/pipelineruns.md)) such that steps can be reusable, but it does not provide a mechanism to generate the resources (notably, [PipelineRuns](https://github.com/tektoncd/pipeline/blob/master/docs/pipelineruns.md) and [PipelineResources](https://github.com/tektoncd/pipeline/blob/master/docs/resources.md#pipelineresources)) that encapsulate these configurations dynamically. Triggers extends the Tekton architecture with the following CRDs: |
15 |
| -- [`TriggerTemplate`](docs/triggertemplates.md) - Templates resources to be created (e.g. Create PipelineResources and PipelineRun that uses them) |
16 |
| -- [`TriggerBinding`](docs/triggerbindings.md) - Validates events and extracts payload fields |
17 |
| -- [`EventListener`](docs/eventlisteners.md) - Connects `TriggerBindings` and `TriggerTemplates` into an [addressable](https://github.com/knative/eventing/blob/master/docs/spec/interfaces.md) 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. |
| 15 | +[Tekton](https://github.com/tektoncd/pipeline) is a **Kubernetes-native**, |
| 16 | +continuous integration and delivery (CI/CD) framework that enables you to create |
| 17 | +containerized, composable, and configurable workloads declaratively through |
| 18 | +CRDs. Naturally, CI/CD events contain information that should: |
| 19 | + |
| 20 | +- Identify the kind of event (GitHub Push, Gitlab Issue, Docker Hub Webhook, |
| 21 | + etc.) |
| 22 | +- Be accessible from and map to particular pipelines (Take SHA from payload to |
| 23 | + use it in pipeline X) |
| 24 | +- Deterministically trigger pipelines (Events/pipelines that trigger pipelines |
| 25 | + based on certain payload values) |
| 26 | + |
| 27 | +The Tekton API enables functionality to be seperated from configuration (e.g. |
| 28 | +[Pipelines](https://github.com/tektoncd/pipeline/blob/master/docs/pipelines.md) |
| 29 | +vs |
| 30 | +[PipelineRuns](https://github.com/tektoncd/pipeline/blob/master/docs/pipelineruns.md)) |
| 31 | +such that steps can be reusable, but it does not provide a mechanism to generate |
| 32 | +the resources (notably, |
| 33 | +[PipelineRuns](https://github.com/tektoncd/pipeline/blob/master/docs/pipelineruns.md) |
| 34 | +and |
| 35 | +[PipelineResources](https://github.com/tektoncd/pipeline/blob/master/docs/resources.md#pipelineresources)) |
| 36 | +that encapsulate these configurations dynamically. Triggers extends the Tekton |
| 37 | +architecture with the following CRDs: |
18 | 38 |
|
| 39 | +- [`TriggerTemplate`](docs/triggertemplates.md) - Templates resources to be |
| 40 | + created (e.g. Create PipelineResources and PipelineRun that uses them) |
| 41 | +- [`TriggerBinding`](docs/triggerbindings.md) - Validates events and extracts |
| 42 | + payload fields |
| 43 | +- [`EventListener`](docs/eventlisteners.md) - Connects `TriggerBindings` and |
| 44 | + `TriggerTemplates` into an |
| 45 | + [addressable](https://github.com/knative/eventing/blob/master/docs/spec/interfaces.md) |
| 46 | + endpoint (the event sink). It uses the extracted event parameters from each |
| 47 | + `TriggerBinding` (and any supplied static parameters) to create the resources |
| 48 | + specified in the corresponding `TriggerTemplate`. It also optionally allows an |
| 49 | + external service to pre-process the event payload via the `interceptor` field. |
19 | 50 |
|
20 |
| -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. |
21 |
| -This repo draws inspiration from `Tekton`, but can used stand alone since `TriggerTemplates` can create any Kubernetes resource. |
| 51 | +Using `tektoncd/triggers` in conjunction with `tektoncd/pipeline` enables you to |
| 52 | +easily create full-fledged CI/CD systems where the execution is defined |
| 53 | +**entirely** through Kubernetes resources. This repo draws inspiration from |
| 54 | +`Tekton`, but can used stand alone since `TriggerTemplates` can create any |
| 55 | +Kubernetes resource. |
22 | 56 |
|
23 | 57 | You can learn more by checking out the [docs](docs/README.md)
|
24 | 58 |
|
25 | 59 | ## Want to start using Tekton Triggers
|
26 | 60 |
|
27 |
| -[Install](./docs/install.md) Triggers, check out the [installation guide](./docs/install.md), [examples](./examples/README.md) or follow the [getting started guide](./docs/getting-started/README.md) 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. |
| 61 | +[Install](./docs/install.md) Triggers, check out the |
| 62 | +[installation guide](./docs/install.md), [examples](./examples/README.md) or |
| 63 | +follow the [getting started guide](./docs/getting-started/README.md) to become |
| 64 | +familiar with the project. The getting started guide walks through setting up an |
| 65 | +end-to-end image building solution, which will be triggered from GitHub `push` |
| 66 | +events. |
28 | 67 |
|
29 | 68 | ### Read the docs
|
30 | 69 |
|
31 |
| -| Version | Docs | Examples | Getting Started | |
32 |
| -| ------- | ---- | -------- | --------------- | |
33 |
| -| [HEAD](https://github.com/tektoncd/triggers/blob/master/DEVELOPMENT.md#install-pipeline) | [Docs @ HEAD](https://github.com/tektoncd/triggers/blob/master/docs/README.md) | [Examples @ HEAD](https://github.com/tektoncd/triggers/blob/master/examples) | [Getting Started @ HEAD](https://github.com/tektoncd/triggers/blob/master/docs/getting-started#getting-started-with-triggers) | |
34 |
| -| [v0.1.0](https://github.com/tektoncd/triggers/releases/tag/v0.1.0) | [Docs @ v0.1.0](https://github.com/tektoncd/triggers/tree/v0.1.0/docs#tekton-triggers) | [Examples @ v0.1.0](https://github.com/tektoncd/triggers/tree/v0.1.0/examples#examples) | [Getting Started @ v0.1.0](https://github.com/tektoncd/triggers/tree/v0.1.0/docs/getting-started#getting-started-with-triggers) | |
| 70 | +| Version | Docs | Examples | Getting Started | |
| 71 | +| ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | |
| 72 | +| [HEAD](https://github.com/tektoncd/triggers/blob/master/DEVELOPMENT.md#install-pipeline) | [Docs @ HEAD](https://github.com/tektoncd/triggers/blob/master/docs/README.md) | [Examples @ HEAD](https://github.com/tektoncd/triggers/blob/master/examples) | [Getting Started @ HEAD](https://github.com/tektoncd/triggers/blob/master/docs/getting-started#getting-started-with-triggers) | |
| 73 | +| [v0.1.0](https://github.com/tektoncd/triggers/releases/tag/v0.1.0) | [Docs @ v0.1.0](https://github.com/tektoncd/triggers/tree/v0.1.0/docs#tekton-triggers) | [Examples @ v0.1.0](https://github.com/tektoncd/triggers/tree/v0.1.0/examples#examples) | [Getting Started @ v0.1.0](https://github.com/tektoncd/triggers/tree/v0.1.0/docs/getting-started#getting-started-with-triggers) | |
35 | 74 |
|
36 | 75 | ## Want to contribute
|
37 | 76 |
|
|
0 commit comments