Skip to content

Commit 662cf8e

Browse files
committed
Trigger doc updates
triger template description changes and release branch changes rpm updates clarification on trigger template and pipeline run creation attributes and typo replacing with version attribute attribute label build fix attribute changes attribute and build attribute fixes removing callouts review fixes
1 parent 3514428 commit 662cf8e

11 files changed

+127
-69
lines changed

modules/op-about-pipelines.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
[id="about-pipelines_{context}"]
66
= Pipelines
77

8-
A _Pipeline_ is a collection of Tasks arranged in a specific order of execution. You can define a CI/CD workflow for your application using Pipelines containing one or more Tasks.
8+
A _Pipeline_ is a collection of `Task` resources arranged in a specific order of execution. You can define a CI/CD workflow for your application using pipelines containing one or more tasks.
99

10-
A Pipeline definition consists of a number of fields or attributes, which together enable the Pipeline to accomplish a specific goal. Each Pipeline definition must contain at least one Task, which ingests specific inputs and produces specific outputs. The Pipeline definition can also optionally include Conditions, Workspaces, Parameters, or Resources depending on the application requirements.
10+
A `Pipeline` resource definition consists of a number of fields or attributes, which together enable the pipeline to accomplish a specific goal. Each `Pipeline` resource definition must contain at least one `Task` resource, which ingests specific inputs and produces specific outputs. The pipeline definition can also optionally include _Conditions_, _Workspaces_, _Parameters_, or _Resources_ depending on the application requirements.
1111

12-
The following example shows the `build-and-deploy` Pipeline, which builds an application image from a Git repository using the `buildah` ClusterTask:
12+
The following example shows the `build-and-deploy` pipeline, which builds an application image from a Git repository using the `buildah` `ClusterTask` resource:
1313

1414
[source,yaml]
1515
----
@@ -30,7 +30,7 @@ spec: <4>
3030
- name: git-revision
3131
type: string
3232
description: revision to be used from repo of the code for deployment
33-
default: "release-tech-preview-2"
33+
default: "release-tech-preview-3"
3434
- name: IMAGE
3535
type: string
3636
description: image to be build from the code

modules/op-about-triggers.adoc

Lines changed: 45 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,22 @@
55
[id="about-triggers_{context}"]
66
= Triggers
77

8-
Use Triggers in conjunction with Pipelines to create a full-fledged CI/CD system where the Kubernetes resources define the entire CI/CD execution. Pipeline Triggers capture the external events and process them to extract key pieces of information. Mapping this event data to a set of predefined parameters triggers a series of tasks that can then create and deploy Kubernetes resources.
8+
Use _Triggers_ in conjunction with pipelines to create a full-fledged CI/CD system where Kubernetes resources define the entire CI/CD execution. Triggers capture the external events and process them to extract key pieces of information. Mapping this event data to a set of predefined parameters triggers a series of tasks that can then create and deploy Kubernetes resources and instantiate the pipeline.
99

10-
For example, you define a CI/CD workflow using {pipelines-title} for your application. The PipelineRun must start for any new changes to take effect in the application repository. Triggers automate this process by capturing and processing any change events and by triggering a PipelineRun that deploys the new image with the latest changes.
10+
For example, you define a CI/CD workflow using {pipelines-title} for your application. The pipeline must start for any new changes to take effect in the application repository. Triggers automate this process by capturing and processing any change event and by triggering a pipeline run that deploys the new image with the latest changes.
1111

12-
Triggers consist of the following main components that work together to form a reusable, decoupled, and self-sustaining CI/CD system:
12+
Triggers consist of the following main resources that work together to form a reusable, decoupled, and self-sustaining CI/CD system:
1313

14-
* _EventListeners_ provide endpoints, or an event sink, that listen for incoming HTTP-based events with a JSON payload. The EventListener performs lightweight event processing 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.
15-
* _TriggerBindings_ extract the fields from an event payload and store them as parameters.
16-
* _TriggerTemplates_ specify how to use the parameterized data from the TriggerBindings. A TriggerTemplate defines a resource template that receives input from the TriggerBindings, and then performs a series of actions that result in creation of new PipelineResources and initiation of a new PipelineRun.
14+
* The `TriggerBinding` resource validates events, extracts the fields from an event payload, and stores them as parameters.
15+
* The `TriggerTemplate` resource acts as a standard for the way resources must be created. It specifies the way parameterized data from the `TriggerBinding` resource should be used.
16+
A trigger template receives input from the trigger binding, and then performs a series of actions that results in creation of new pipeline resources, and initiation of a new pipeline run.
1717

18-
EventListeners tie the concepts of TriggerBindings and TriggerTemplates together. The EventListener listens for the incoming event, handles basic filtering using Interceptors, extracts data using TriggerBindings, and then processes this data to create Kubernetes resources using TriggerTemplates.
18+
* 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_.
1919

20+
* The `Trigger` resource connects the `TriggerBinding` and `TriggerTemplate` resources, and this `Trigger` resource is referenced in the `EventListener` specification.
2021
//image::op-triggers.png[]
2122

22-
The following example shows a code snippet of the `vote-app-binding` TriggerBinding, which extracts the Git repository information from the received event payload:
23+
The following example shows a code snippet of the `TriggerBinding` resource, which extracts the Git repository information from the received event payload:
2324

2425
[source,yaml]
2526
----
@@ -37,13 +38,13 @@ spec:
3738
value: $(body.head_commit.id)
3839
----
3940

40-
<1> TriggerBinding API version `v1alpha1`.
41+
<1> The API version of the `TriggerBinding` resource. In this example, `v1alpha1`.
4142
<2> Specifies the type of Kubernetes object. In this example, `TriggerBinding`.
42-
<3> Unique name to identify this TriggerBinding.
43-
<4> List of parameters which will be extracted from the received event payload and passed to the TriggerTemplate. In this example, the Git repository URL, name, and revision are extracted from the body of the event payload.
43+
<3> Unique name to identify the `TriggerBinding` resource.
44+
<4> List of parameters which will be extracted from the received event payload and passed to the `TriggerTemplate` resource. In this example, the Git repository URL, name, and revision are extracted from the body of the event payload.
4445

4546

46-
The following example shows a code snippet of a `vote-app-template` TriggerTemplate, which creates Pipeline Resources from the Git repository information received from the TriggerBinding:
47+
The following example shows a code snippet of a `TriggerTemplate` resource, which creates a pipeline run using the Git repository information received from the `TriggerBinding` resource you just created:
4748
[source,yaml]
4849
----
4950
apiVersion: triggers.tekton.dev/v1alpha1 <1>
@@ -84,14 +85,37 @@ spec:
8485
claimName: source-pvc
8586
----
8687

87-
<1> TriggerTemplate API version `v1alpha1`.
88+
<1> The API version of the `TriggerTemplate` resource. In this example, `v1alpha1`.
8889
<2> Specifies the type of Kubernetes object. In this example, `TriggerTemplate`.
89-
<3> Unique name to identify this TriggerTemplate.
90-
<4> Parameters supplied by the TriggerBinding or EventListerner.
91-
<5> List of Resource templates created for the Pipeline from the parameters received in the TriggerBinding or EventListener.
90+
<3> Unique name to identify the `TriggerTemplate` resource.
91+
<4> Parameters supplied by the `TriggerBinding` or `EventListerner` resources.
92+
<5> List of templates that specify the way resources must be created using the parameters received through the `TriggerBinding` or `EventListener` resources.
9293

9394

94-
The following example shows an EventListener which uses `vote-app-binding` TriggerBinding and `vote-app-template` TriggerTemplate to process incoming events.
95+
The following example shows a code snippet of a `Trigger` resource, named `vote-trigger` that connects the `TriggerBinding` and `TriggerTemplate` resources.
96+
97+
[source,yaml]
98+
----
99+
apiVersion: triggers.tekton.dev/v1alpha1 <1>
100+
kind: Trigger <2>
101+
metadata:
102+
name: vote-trigger <3>
103+
spec:
104+
serviceAccountName: pipeline <4>
105+
bindings:
106+
- ref: vote-app <5>
107+
template: <6>
108+
name: vote-app
109+
----
110+
<1> The API version of the `Trigger` resource. In this example, `v1alpha1`.
111+
<2> Specifies the type of Kubernetes object. In this example, `Trigger`.
112+
<3> Unique name to identify the `Trigger` resource.
113+
<4> Service account name to be used.
114+
<5> Name of the `TriggerBinding` resource to be connected to the `TriggerTemplate` resource.
115+
<6> Name of the `TriggerTemplate` resource to be connected to the `TriggerBinding` resource.
116+
117+
118+
The following example shows an `EventListener` resource, which references the `Trigger` resource named `vote-trigger`.
95119

96120
[source,yaml]
97121
----
@@ -102,14 +126,10 @@ metadata:
102126
spec:
103127
serviceAccountName: pipeline <4>
104128
triggers:
105-
- bindings: <5>
106-
- ref: vote-app
107-
template: <6>
108-
name: vote-app
129+
- triggerRef: vote-trigger <5>
109130
----
110-
<1> EventListener API version `v1alpha1`.
131+
<1> The API version of the `EventListener` resource. In this example, `v1alpha1`.
111132
<2> Specifies the type of Kubernetes object. In this example, `EventListener`.
112-
<3> Unique name to identify this EventListener.
133+
<3> Unique name to identify the `EventListener` resource.
113134
<4> Service account name to be used.
114-
<5> Name of the TriggerBinding to be used for this EventListener.
115-
<6> Name of the Triggertemplate to be used for this Eventlistener.
135+
<5> Name of the `Trigger` resource referenced by the `EventListener` resource.

modules/op-adding-triggers.adoc

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[id="adding-triggers_{context}"]
66
= Adding Triggers to a Pipeline
77

8-
Triggers enable Pipelines to respond to external GitHub events, such as push events and pull requests. After you have assembled and started the Pipeline for the application, add TriggerBindings, TriggerTemplates, and an EventListener to capture the GitHub events.
8+
Triggers enable pipelines to respond to external GitHub events, such as push events and pull requests. After you assemble and start a Pipeline for the application, add the `TriggerBinding`, `TriggerTemplate`, `Trigger`, and `EventListener` resources to capture the GitHub events.
99

1010
[discrete]
1111
.Procedure
@@ -27,21 +27,23 @@ spec:
2727
value: $(body.head_commit.id)
2828
----
2929

30-
. Create the `TriggerBinding`:
30+
. Create the `TriggerBinding` resource:
3131
+
32+
[source,terminal]
3233
----
3334
$ oc create -f <triggerbinding-yaml-file-name.yaml>
3435
----
3536
+
36-
Alternatively, you can create the `TriggerBinding` directly from the `pipelines-tutorial` Git repository:
37+
Alternatively, you can create the `TriggerBinding` resource directly from the `pipelines-tutorial` Git repository:
3738
+
39+
[source,terminal,subs="attributes+"]
3840
----
39-
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-2/03_triggers/01_binding.yaml
41+
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/{pipelines-ver}/03_triggers/01_binding.yaml
4042
----
4143

4244
. Copy the content of the following sample `TriggerTemplate` YAML file and save it:
4345
+
44-
[source,yaml]
46+
[source,yaml,subs="attributes+"]
4547
----
4648
apiVersion: triggers.tekton.dev/v1alpha1
4749
kind: TriggerTemplate
@@ -53,7 +55,7 @@ spec:
5355
description: The git repository url
5456
- name: git-revision
5557
description: The git revision
56-
default: release-tech-preview-2
58+
default: {pipelines-ver}
5759
- name: git-repo-name
5860
description: The name of the deployment to be created / patched
5961
@@ -81,16 +83,48 @@ spec:
8183
claimName: source-pvc
8284
----
8385

84-
. Create the `TriggerTemplate`:
86+
. Create the `TriggerTemplate` resource:
8587
+
88+
[source,terminal]
8689
----
8790
$ oc create -f <triggertemplate-yaml-file-name.yaml>
8891
----
8992
+
90-
Alternatively, you can create the `TriggerTemplate` directly from the `pipelines-tutorial` Git repository:
93+
Alternatively, you can create the `TriggerTemplate` resource directly from the `pipelines-tutorial` Git repository:
94+
+
95+
[source,terminal,subs="attributes+"]
96+
----
97+
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/{pipelines-ver}/03_triggers/02_template.yaml
98+
----
99+
100+
. Copy the contents of the following sample `Trigger` YAML file and save it:
101+
+
102+
[source,yaml]
103+
----
104+
apiVersion: triggers.tekton.dev/v1alpha1
105+
kind: Trigger
106+
metadata:
107+
name: vote-trigger
108+
spec:
109+
serviceAccountName: pipeline
110+
bindings:
111+
- ref: vote-app
112+
template:
113+
name: vote-app
114+
----
115+
116+
. Create the `Trigger` resource:
117+
+
118+
[source,terminal]
119+
----
120+
$ oc create -f <trigger-yaml-file-name.yaml>
121+
----
122+
+
123+
Alternatively, you can create the `Trigger` resource directly from the `pipelines-tutorial` Git repository:
91124
+
125+
[source,terminal,subs="attributes+"]
92126
----
93-
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-2/03_triggers/02_template.yaml
127+
$ oc create -f https://github.com/openshift/pipelines-tutorial/blob/{pipelines-ver}/03_triggers/03_trigger.yaml
94128
----
95129

96130
. Copy the contents of the following sample `EventListener` YAML file and save it:
@@ -104,26 +138,26 @@ metadata:
104138
spec:
105139
serviceAccountName: pipeline
106140
triggers:
107-
- bindings:
108-
- name: vote-app
109-
template:
110-
name: vote-app
141+
- triggerRef: vote-trigger
111142
----
112143

113-
. Create the `EventListener`:
144+
. Create the `EventListener` resource:
114145
+
146+
[source,terminal]
115147
----
116148
$ oc create -f <eventlistener-yaml-file-name.yaml>
117149
----
118150
+
119-
Alternatively, you can create the `EvenListener` directly from the `pipelines-tutorial` Git repository:
151+
Alternatively, you can create the `EvenListener` resource directly from the `pipelines-tutorial` Git repository:
120152
+
153+
[source,terminal,subs="attributes+"]
121154
----
122-
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-2/03_triggers/03_event_listener.yaml
155+
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/{pipelines-ver}/03_triggers/04_event_listener.yaml
123156
----
124157

125-
. Expose the EventListener service as an {product-title} route to make it publicly accessible:
158+
. Expose the `EventListener` service as an {product-title} route to make it publicly accessible:
126159
+
160+
[source,terminal]
127161
----
128162
$ oc expose svc el-vote-app
129163
----

modules/op-assembling-a-pipeline.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The Pipeline performs the following tasks for the back-end application `vote-api
2828

2929
. Copy the contents of the following sample Pipeline YAML file and save it:
3030
+
31-
[source,yaml]
31+
[source,yaml,subs="attributes+"]
3232
----
3333
apiVersion: tekton.dev/v1beta1
3434
kind: Pipeline
@@ -47,7 +47,7 @@ spec:
4747
- name: git-revision
4848
type: string
4949
description: revision to be used from repo of the code for deployment
50-
default: "release-tech-preview-2"
50+
default: "{pipelines-ver}"
5151
- name: IMAGE
5252
type: string
5353
description: image to be build from the code
@@ -115,8 +115,9 @@ $ oc create -f <pipeline-yaml-file-name.yaml>
115115
+
116116
Alternatively, you can also execute the YAML file directly from the Git repository:
117117
+
118+
[source,terminal,subs="attributes+"]
118119
----
119-
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-2/01_pipeline/04_pipeline.yaml
120+
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/{pipelines-ver}/01_pipeline/04_pipeline.yaml
120121
----
121122

122123
. Use the `tkn pipeline list` command to verify that the Pipeline is added to the application:

modules/op-creating-pipeline-tasks.adoc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,40 @@
88
[discrete]
99
.Procedure
1010

11-
. Install the `apply-manifests` and `update-deployment` Tasks from the `pipelines-tutorial` repository, which contains a list of reusable Tasks for Pipelines:
11+
. Install the `apply-manifests` and `update-deployment` `Task` resources from the `pipelines-tutorial` repository, which contains a list of reusable tasks for pipelines:
1212
+
13+
[source,terminal,subs="attributes+"]
1314
----
14-
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-2/01_pipeline/01_apply_manifest_task.yaml
15-
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/release-tech-preview-2/01_pipeline/02_update_deployment_task.yaml
15+
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/{pipelines-ver}/01_pipeline/01_apply_manifest_task.yaml
16+
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/{pipelines-ver}/01_pipeline/02_update_deployment_task.yaml
1617
----
1718

18-
. Use the `tkn task list` command to list the Tasks you created:
19+
. Use the `tkn task list` command to list the tasks you created:
1920
+
2021
----
2122
$ tkn task list
2223
----
2324
+
24-
The output verifies that the `apply-manifests` and `update-deployment` Tasks were created:
25+
The output verifies that the `apply-manifests` and `update-deployment` `Task` resources were created:
2526
+
2627
----
2728
NAME DESCRIPTION AGE
2829
apply-manifests 1 minute ago
2930
update-deployment 48 seconds ago
3031
----
3132

32-
. Use the `tkn clustertasks list` command to list the Operator-installed additional ClusterTasks, for example --`buildah` and `s2i-python-3`:
33+
. Use the `tkn clustertasks list` command to list the Operator-installed additional `ClusterTask` resources, for example --`buildah` and `s2i-python-3`:
3334
+
3435
[NOTE]
3536
====
36-
You must use a privileged Pod container to run the `buildah` ClusterTask because it requires a privileged security context. To learn more about security context constraints (SCC) for pods, see the Additional resources section.
37+
You must use a privileged pod container to run the `buildah` `ClusterTask` resource because it requires a privileged security context. To learn more about security context constraints (SCC) for pods, see the Additional resources section.
3738
====
3839
+
3940
----
4041
$ tkn clustertasks list
4142
----
4243
+
43-
The output lists the Operator-installed ClusterTasks:
44+
The output lists the Operator-installed `ClusterTask` resources:
4445
+
4546
----
4647
NAME DESCRIPTION AGE

modules/op-installing-tkn-on-linux-using-rpm.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ For {op-system-base-full} version 8, you can install the {pipelines-title} CLI (
4747
+
4848
[source,terminal]
4949
----
50-
# subscription-manager repos --enable="pipelines-1.1-for-rhel-8-x86_64-rpms"
50+
# subscription-manager repos --enable="pipelines-1.2-for-rhel-8-x86_64-rpms"
5151
----
5252

5353
. Install the `openshift-pipelines-client` package:

modules/op-installing-tkn-on-linux.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For Linux distributions, you can download the CLI directly as a `tar.gz` archive
1010

1111
.Procedure
1212

13-
. Download the link:https://mirror.openshift.com/pub/openshift-v4/clients/pipeline/0.11.0/tkn-linux-amd64-0.11.0.tar.gz[CLI].
13+
. Download the link:https://mirror.openshift.com/pub/openshift-v4/clients/pipeline/0.13.1/tkn-linux-amd64-0.13.1.tar.gz[CLI].
1414

1515
. Unpack the archive:
1616
+

modules/op-installing-tkn-on-macos.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For macOS, the `tkn` CLI is provided as a `tar.gz` archive.
1010

1111
.Procedure
1212

13-
. Download the link:https://mirror.openshift.com/pub/openshift-v4/clients/pipeline/0.11.0/tkn-macos-amd64-0.11.0.tar.gz[CLI].
13+
. Download the link:https://mirror.openshift.com/pub/openshift-v4/clients/pipeline/0.13.1/tkn-macos-amd64-0.13.1.tar.gz[CLI].
1414

1515
. Unpack and unzip the archive.
1616

0 commit comments

Comments
 (0)