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

Format markdown #430

Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions docs/clustertriggerbindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ designed to encourage reusability clusterwide. You can reference a
ClusterTriggerBinding in any EventListener in any namespace.

<!-- FILE: examples/clustertriggerbindings/clustertriggerbinding.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
kind: ClusterTriggerBinding
Expand All @@ -21,14 +22,14 @@ spec:
value: $(header.Content-Type)
```


You can specify multiple ClusterTriggerBindings in a Trigger. You can use a
ClusterTriggerBinding in multiple Triggers.

In case of using a ClusterTriggerBinding, the `Binding` kind should be added.
The default kind is TriggerBinding which represents a namespaced TriggerBinding.

<!-- FILE: examples/eventlisteners/eventlistener-clustertriggerbinding.yaml -->

```YAML
---
apiVersion: tekton.dev/v1alpha1
Expand All @@ -47,4 +48,3 @@ spec:
template:
name: pipeline-template
```

12 changes: 6 additions & 6 deletions docs/eventlisteners.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resources will be created (or at least attempted) with. The service account must
have the following role bound.

<!-- FILE: examples/role-resources/triggerbinding-roles/role.yaml -->

```YAML
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -26,7 +27,6 @@ rules:
verbs: ["create"]
```


Note that currently, JSON is the only accepted MIME type for events.

When an `EventListener` is successfully created, a service is created that
Expand Down Expand Up @@ -115,6 +115,7 @@ To be an Event Interceptor, a Kubernetes object should:
the body, it can simply return the body that it received.

<!-- FILE: examples/eventlisteners/eventlistener-interceptor.yaml -->

```YAML
---
apiVersion: tekton.dev/v1alpha1
Expand Down Expand Up @@ -145,7 +146,6 @@ spec:
name: pipeline-template
```


### GitHub Interceptors

GitHub interceptors contain logic to validate and filter webhooks that come from
Expand All @@ -167,6 +167,7 @@ The body/header of the incoming request will be preserved in this interceptor's
response.

<!-- FILE: examples/eventlisteners/github-eventlistener-interceptor.yaml -->

```YAML
---
apiVersion: tekton.dev/v1alpha1
Expand All @@ -190,7 +191,6 @@ spec:
name: pipeline-template
```


### GitLab Interceptors

GitLab interceptors contain logic to validate and filter requests that come from
Expand All @@ -213,6 +213,7 @@ The body/header of the incoming request will be preserved in this interceptor's
response.

<!-- FILE: examples/eventlisteners/gitlab-eventlistener-interceptor.yaml -->

```YAML
---
apiVersion: tekton.dev/v1alpha1
Expand All @@ -236,7 +237,6 @@ spec:
name: pipeline-template
```


### CEL Interceptors

CEL interceptors parse expressions to filter requests based on JSON bodies and
Expand All @@ -254,6 +254,7 @@ The body/header of the incoming request will be preserved in this interceptor's
response.

<!-- FILE: examples/eventlisteners/cel-eventlistener-interceptor.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
kind: EventListener
Expand Down Expand Up @@ -283,13 +284,13 @@ spec:
name: pipeline-template
```


If no filter is provided, then the overlays will be applied to the body,

With a filter, the `expression` must return a `true` value, otherwise the
request will be filtered out.

<!-- FILE: examples/eventlisteners/cel-eventlistener-no-filter.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
kind: EventListener
Expand All @@ -309,4 +310,3 @@ spec:
template:
name: pipeline-template
```

2 changes: 1 addition & 1 deletion docs/triggerbindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters. The separation of `TriggerBinding`s from `TriggerTemplate`s was
deliberate to encourage reuse between them.

<!-- FILE: examples/triggerbindings/triggerbinding.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
kind: TriggerBinding
Expand All @@ -21,7 +22,6 @@ spec:
value: $(header.Content-Type)
```


`TriggerBinding`s are connected to `TriggerTemplate`s within an
[`EventListener`](eventlisteners.md), which is where the pod is actually
instantiated that "listens" for the respective events.
Expand Down
2 changes: 1 addition & 1 deletion docs/triggertemplates.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ A `TriggerTemplate` is a resource that can template resources.
**anywhere** within the resource template.

<!-- FILE: examples/triggertemplates/triggertemplate.yaml -->

```YAML
apiVersion: tekton.dev/v1alpha1
kind: TriggerTemplate
Expand Down Expand Up @@ -46,7 +47,6 @@ spec:
value: $(params.gitrepositoryurl)
```


Similar to
[Pipelines](https://github.com/tektoncd/pipeline/blob/master/docs/pipelines.md),`TriggerTemplate`s
do not do any actual work, but instead act as the blueprint for what resources
Expand Down