forked from tektoncd/triggers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
triggers.yaml
72 lines (72 loc) · 2.08 KB
/
triggers.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: getting-started-triggertemplate
namespace: getting-started
spec:
params:
- name: gitrevision
description: The git revision
default: master
- name: gitrepositoryurl
description: The git repository url
- name: namespace
description: The namespace to create the resources
resourcetemplates:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: getting-started-pipeline-run-
namespace: $(tt.params.namespace)
spec:
serviceAccountName: tekton-triggers-example-sa
pipelineRef:
name: getting-started-pipeline
resources:
- name: source-repo
resourceSpec:
type: git
params:
- name: revision
value: $(tt.params.gitrevision)
- name: url
value: $(tt.params.gitrepositoryurl)
- name: image-source
resourceSpec:
type: image
params:
- name: url
value: DOCKERREPO-REPLACEME # docker-repo-location.com/repo:getting-started
- name: event-to-sink
resourceSpec:
type: cloudEvent
params:
- name: targetURI
value: http://event-display.getting-started.svc.cluster.local
---
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: getting-started-pipelinebinding
namespace: getting-started
spec:
params:
- name: gitrevision
value: $(body.head_commit.id)
- name: namespace
value: getting-started
- name: gitrepositoryurl
value: "https://github.com/$(body.repository.full_name)"
---
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: getting-started-listener
namespace: getting-started
spec:
serviceAccountName: tekton-triggers-example-sa
triggers:
- bindings:
- ref: getting-started-pipelinebinding
template:
ref: getting-started-triggertemplate