This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 121
/
400-monitor-triggertemplate.yaml
110 lines (110 loc) · 3.16 KB
/
400-monitor-triggertemplate.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: monitor-task-template
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-webhooks-extension
spec:
params:
- name: pullrequesturl
description: The pull request url
type: string
- name: statusesurl
description: The statuses url
type: string
- name: gitsecretname
description: The git secret name
default: github-secrets
type: string
- name: gitsecretkeyname
description: The git secret key name
default: token
type: string
- name: commentsuccess
description: The text of the success comment
default: "Success"
type: string
- name: commentfailure
description: The text of the failure comment
default: "Failed"
type: string
- name: commenttimeout
description: The text of the timeout comment
default: "Unknown"
type: string
- name: commentmissing
description: The text of the missing comment
default: "Missing"
type: string
- name: dashboardurl
description: The URL to the pipelineruns page of the dashboard
default: "http://localhost:9097/"
type: string
- name: provider
description: The git provider, "github" or "gitlab"
default: "github"
type: string
- name: apiurl
description: The git api URL for the repository
default: ""
type: string
- name: insecure-skip-tls-verify
description: Whether or not to skip SSL validation of certificates ("true" or "false")
default: "false"
type: string
resourcetemplates:
- apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: pull-request-$(uid)
namespace: tekton-pipelines
spec:
type: pullRequest
params:
- name: url
value: $(params.pullrequesturl)
- name: insecure-skip-tls-verify
value: $(params.insecure-skip-tls-verify)
secrets:
- fieldName: authToken
secretName: $(params.gitsecretname)
secretKey: $(params.gitsecretkeyname)
- apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
generateName: monitor-taskrun-
namespace: tekton-pipelines
spec:
serviceAccountName: tekton-webhooks-extension
taskRef:
name: monitor-task
params:
- name: commentsuccess
value: $(params.commentsuccess)
- name: commentfailure
value: $(params.commentfailure)
- name: commenttimeout
value: $(params.commenttimeout)
- name: dashboard-url
value: $(params.dashboardurl)
- name: secret
value: $(params.gitsecretname)
- name: statusesurl
value: $(params.statusesurl)
- name: provider
value: $(params.provider)
- name: apiurl
value: $(params.apiurl)
- name: insecure-skip-tls-verify
value: $(params.insecure-skip-tls-verify)
resources:
inputs:
- name: pull-request
resourceRef:
name: pull-request-$(uid)
outputs:
- name: pull-request
resourceRef:
name: pull-request-$(uid)