You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/op-about-triggers.adoc
+32-9Lines changed: 32 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ For example, you define a CI/CD workflow using {pipelines-title} for your applic
12
12
Triggers consist of the following main resources that work together to form a reusable, decoupled, and self-sustaining CI/CD system:
13
13
14
14
--
15
-
* The `TriggerBinding` resource validates events, extracts the fields from an event payload, and stores them as parameters.
15
+
* The `TriggerBinding` resource extracts the fields from an event payload and stores them as parameters.
16
16
+
17
17
The following example shows a code snippet of the `TriggerBinding` resource, which extracts the Git repository information from the received event payload:
18
18
+
@@ -90,13 +90,15 @@ spec:
90
90
<1> The API version of the `TriggerTemplate` resource. In this example, `v1alpha1`.
91
91
<2> Specifies the type of Kubernetes object. In this example, `TriggerTemplate`.
92
92
<3> Unique name to identify the `TriggerTemplate` resource.
93
-
<4> Parameters supplied by the `TriggerBinding` or `EventListerner` resources.
93
+
<4> Parameters supplied by the `TriggerBinding` resource.
94
94
<5> List of templates that specify the way resources must be created using the parameters received through the `TriggerBinding` or `EventListener` resources.
95
95
96
-
* The `Trigger` resource connects the `TriggerBinding` and `TriggerTemplate` resources, and this `Trigger` resource is referenced in the `EventListener` specification.
96
+
* The `Trigger` resource combines the `TriggerBinding` and `TriggerTemplate` resources, and optionally, the `interceptors` event processor.
97
+
+
98
+
Interceptors process all the events for a specific platform that runs before the `TriggerBinding` resource. You can use interceptors to filter the payload, verify events, define and test trigger conditions, and implement other useful processing. Interceptors use secret for event verification. Once the event data passes through an interceptor, it then goes to the trigger before you pass the payload data to the trigger binding. You can also use an interceptor to modify the behavior of the associated trigger referenced in the `EventListener` specification.
97
99
//image::op-triggers.png[]
98
100
+
99
-
The following example shows a code snippet of a `Trigger` resource, named `vote-trigger` that connects the `TriggerBinding` and `TriggerTemplate` resources.
101
+
The following example shows a code snippet of a `Trigger` resource, named `vote-trigger` that connects the `TriggerBinding` and `TriggerTemplate` resources, and the `interceptors` event processor.
100
102
+
101
103
[source,yaml]
102
104
----
@@ -106,20 +108,41 @@ metadata:
106
108
name: vote-trigger <3>
107
109
spec:
108
110
serviceAccountName: pipeline <4>
111
+
interceptors:
112
+
- ref:
113
+
name: "github" <5>
114
+
params: <6>
115
+
- name: "secretRef"
116
+
value:
117
+
secretName: github-secret
118
+
secretKey: secretToken
119
+
- name: "eventTypes"
120
+
value: ["push"]
109
121
bindings:
110
-
- ref: vote-app <5>
111
-
template: <6>
122
+
- ref: vote-app <7>
123
+
template: <8>
112
124
ref: vote-app
125
+
...
126
+
apiVersion: v1
127
+
kind: Secret <9>
128
+
metadata:
129
+
name: github-secret
130
+
type: Opaque
131
+
stringData:
132
+
secretToken: "1234567"
113
133
----
114
134
+
115
135
<1> The API version of the `Trigger` resource. In this example, `v1alpha1`.
116
136
<2> Specifies the type of Kubernetes object. In this example, `Trigger`.
117
137
<3> Unique name to identify the `Trigger` resource.
118
138
<4> Service account name to be used.
119
-
<5> Name of the `TriggerBinding` resource to be connected to the `TriggerTemplate` resource.
120
-
<6> Name of the `TriggerTemplate` resource to be connected to the `TriggerBinding` resource.
139
+
<5> Interceptor name to be referenced. In this example, `github`.
140
+
<6> Desired parameters to be specified.
141
+
<7> Name of the `TriggerBinding` resource to be connected to the `TriggerTemplate` resource.
142
+
<8> Name of the `TriggerTemplate` resource to be connected to the `TriggerBinding` resource.
143
+
<9> Secret to be used to verify events.
121
144
122
-
* The `EventListener` resource provides an endpoint, or an event sink, that listens for incoming HTTP-based events with a JSON payload. It extracts event parameters from each `TriggerBinding` resource, and then processes this data to create Kubernetes resources as specified by the corresponding `TriggerTemplate` resource. The `EventListener` resource also performs lightweight event processing or basic filtering on the payload using event `interceptors`, which identify the type of payload and optionally modify it. Currently, pipeline triggers support four types of interceptors: _Webhook Interceptors_, _GitHub Interceptors_, _GitLab Interceptors_, and _Common Expression Language (CEL) Interceptors_.
145
+
* The `EventListener` resource provides an endpoint, or an event sink, that listens for incoming HTTP-based events with a JSON payload. It extracts event parameters from each `TriggerBinding` resource, and then processes this data to create Kubernetes resources as specified by the corresponding `TriggerTemplate` resource. The `EventListener` resource also performs lightweight event processing or basic filtering on the payload using event `interceptors`, which identify the type of payload and optionally modify it. Currently, pipeline triggers support five types of interceptors: _Webhook Interceptors_, _GitHub Interceptors_, _GitLab Interceptors_, _Bitbucket Interceptors_, and _Common Expression Language (CEL) Interceptors_.
123
146
+
124
147
The following example shows an `EventListener` resource, which references the `Trigger` resource named `vote-trigger`.
Copy file name to clipboardExpand all lines: modules/op-installing-pipelines-operator-in-web-console.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,9 @@ If you manually changed your existing installation, such as, changing the target
19
19
The {pipelines-title} Operator now provides the option to choose the components that you want to install by specifying profiles as part of the `TektonConfig` CR. The `TektonConfig` CR is automatically installed when the Operator is installed.
20
20
The supported profiles are:
21
21
22
-
* Basic: This installs only Tekton pipelines.
23
-
* Default: This installs Tekton pipeline and Tekton triggers.
24
-
* All: This is the default profile used when the `TektonConfig` CR is installed. This profile installs all of the Tekton components: Tekton Pipelines, Tekton Triggers, Tekton Addons(which include `ClusterTasks`, `ClusterTriggerBindings`, `ConsoleCLIDownload`, `ConsoleQuickStart` and `ConsoleYAMLSample` resources).
22
+
* Lite: This installs only Tekton Pipelines.
23
+
* Basic: This installs Tekton Pipelines and Tekton Triggers.
24
+
* All: This is the default profile used when the `TektonConfig` CR is installed. This profile installs all of the Tekton components: Tekton Pipelines, Tekton Triggers, Tekton Addons(which include `ClusterTasks`, `ClusterTriggerBindings`, `ConsoleCLIDownload`, `ConsoleQuickStart` and `ConsoleYAMLSample` resources).
0 commit comments