Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update descriptions for TriggerTemplates and TriggerBindings #991

Merged
merged 1 commit into from
Mar 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ the functionality of Tekton Pipelines to support events:
* [`Trigger`](https://github.com/tektoncd/triggers/blob/main/docs/triggers.md) - specifies what happens when the `EventListener` detects an event. A `Trigger` specifies
a `TriggerTemplate`, a `TriggerBinding`, and optionally, an `Interceptor`.

* [`TriggerTemplate`](https://github.com/tektoncd/triggers/blob/main/docs/triggertemplates.md) - specifies a template for the `TaskRun` or `PipelineRun` you want to
instantiate and execute when EventListener detects an event.
* [`TriggerTemplate`](https://github.com/tektoncd/triggers/blob/main/docs/triggertemplates.md) - specifies a blueprint for the resource, such as a `TaskRun` or `PipelineRun`,
that you want to instantiate and/or execute when your `EventListener` detects an event. It exposes parameters that you can use anywhere within your resource's template.

* [`TriggerBinding`](https://github.com/tektoncd/triggers/blob/main/docs/triggerbindings.md) - specifies the fields in the event payload from which you want to extract
data as well as the fields in your `TaskRun` or `PipelineRun` to populate with the extracted values. In other words, it *binds* payload fields to `TaskRun` or
`PipelineRun` fields.
data and the fields in your corresponding `TriggerTemplate` to populate with the extracted values. You can then use the populated fields in the `TriggerTemplate` to
populate fields in the associated `TaskRun` or `PipelineRun`.

* [`ClusterTriggerBinding`](https://github.com/tektoncd/triggers/blob/main/docs/clustertriggerbindings.md) - a cluster-scoped version of the `TriggerBinding`,
* [`ClusterTriggerBinding`](https://github.com/tektoncd/triggers/blob/main/docs/triggerbindings.md) - a cluster-scoped version of the `TriggerBinding`,
especially useful for reuse within your cluster.

* [`Interceptor`](https://github.com/tektoncd/triggers/blob/main/docs/eventlisteners.md#interceptors) - a "catch-all" event processor for a specific platform that
runs before the `TriggerBinding` enabling you to perform payload filtering, verification (using a secret), transformation, define and test trigger conditions, and other
useful processing. Once the event data passes through an interceptor, it then goes to the `Trigger` before you pass the payload data to the `TriggerBinding`.

**Note:** `Interceptors` are currently part of the `EventListener` API but are being converted to a standalone CRD in [PR 960](https://github.com/tektoncd/triggers/pull/960).
**Note:** `Interceptors` are currently part of `EventListeners` but are being converted to a standalond CRD in [PR 960](https://github.com/tektoncd/triggers/pull/960).


## What can I do with Triggers?
Expand All @@ -57,7 +57,8 @@ As an example, you can implement the following CI/CD workflow with Triggers:

2. Triggers listens for a git push event indicating the test finished successfully. When it detects one, it validates the test's outcome and executes a `Pipeline` that builds the tested code.

3. When the associated `PipelineRun` completes execution, Triggers checks the outcome of the build, and if it's successful, executes a [`Task`](https://github.com/tektoncd/pipeline/blob/master/docs/tasks.md) that uploads the build artifacts to the Docker registry of your choice.
3. When the associated `PipelineRun` completes execution, Triggers checks the outcome of the build, and if it's successful, executes a [`Task`](https://github.com/tektoncd/pipeline/blob/master/docs/tasks.md)
that uploads the build artifacts to the Docker registry of your choice.

4. Finally, the Docker registry sends an event to [Pub/Sub](https://cloud.google.com/pubsub/docs/overview), which triggers a `Pipeline` that pushes the build artifacts to a staging environment.

Expand Down