Skip to content

Commit 04dc5e1

Browse files
authored
Merge pull request #34675 from Srivaralakshmi/Tutorial-pipelines-1.5
Document tutorial updates for Pipelines1.5
2 parents 869268e + bf843d4 commit 04dc5e1

File tree

3 files changed

+36
-13
lines changed

3 files changed

+36
-13
lines changed

modules/op-about-triggers.adoc

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For example, you define a CI/CD workflow using {pipelines-title} for your applic
1212
Triggers consist of the following main resources that work together to form a reusable, decoupled, and self-sustaining CI/CD system:
1313

1414
--
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.
1616
+
1717
The following example shows a code snippet of the `TriggerBinding` resource, which extracts the Git repository information from the received event payload:
1818
+
@@ -90,13 +90,15 @@ spec:
9090
<1> The API version of the `TriggerTemplate` resource. In this example, `v1alpha1`.
9191
<2> Specifies the type of Kubernetes object. In this example, `TriggerTemplate`.
9292
<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.
9494
<5> List of templates that specify the way resources must be created using the parameters received through the `TriggerBinding` or `EventListener` resources.
9595

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.
9799
//image::op-triggers.png[]
98100
+
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.
100102
+
101103
[source,yaml]
102104
----
@@ -106,20 +108,41 @@ metadata:
106108
name: vote-trigger <3>
107109
spec:
108110
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"]
109121
bindings:
110-
- ref: vote-app <5>
111-
template: <6>
122+
- ref: vote-app <7>
123+
template: <8>
112124
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"
113133
----
114134
+
115135
<1> The API version of the `Trigger` resource. In this example, `v1alpha1`.
116136
<2> Specifies the type of Kubernetes object. In this example, `Trigger`.
117137
<3> Unique name to identify the `Trigger` resource.
118138
<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.
121144

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_.
123146
+
124147
The following example shows an `EventListener` resource, which references the `Trigger` resource named `vote-trigger`.
125148
+

modules/op-installing-pipelines-operator-in-web-console.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ If you manually changed your existing installation, such as, changing the target
1919
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.
2020
The supported profiles are:
2121

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).
2525

2626
[discrete]
2727
.Procedure

modules/pipelines-document-attributes.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
//
1010
:pipelines-title: Red Hat OpenShift Pipelines
1111
:pipelines-shortname: Pipelines
12-
:pipelines-ver: pipelines-1.4
12+
:pipelines-ver: pipelines-1.5

0 commit comments

Comments
 (0)