-
Notifications
You must be signed in to change notification settings - Fork 420
/
triggers.yaml
67 lines (67 loc) · 1.86 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
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
params:
- name: git-revision
value: $(tt.params.gitrevision)
- name: git-url
value: $(tt.params.gitrepositoryurl)
- name: url
value: DOCKERREPO-REPLACEME # docker-repo-location.com/repo:getting-started
workspaces:
- name: git-source
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
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