-
Notifications
You must be signed in to change notification settings - Fork 3
/
task.yaml
52 lines (52 loc) · 1.18 KB
/
task.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
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: slack-notify
spec:
description: >-
This task sends a message to slack channel.
params:
- name: channel
type: string
description: slack channel id
- name: text
type: string
description: slack message text
- name: slack_secret
type: string
description: name of slack token secret
- name: thread_ts
type: string
description: thread ts, when specified, the message will be sent to thread.
default: ""
- name: slack_secret_key
type: string
description: key in slack token secret
default: token
volumes:
- name: slack
secret:
secretName: $(params.slack_secret)
results:
- name: ts
description: slack message ts
steps:
- image: ghcr.io/ebay/tekton-slack-notify:0.1
name: slack-notify
volumeMounts:
- name: slack
mountPath: /etc/slack-notify
readOnly: true
command:
- /ko-app/tekton-slack-notify
args:
- --channel
- $(params.channel)
- --text
- $(params.text)
- --thread-ts
- $(params.thread_ts)
- --ts-file
- $(results.ts.path)
- --token-file
- /etc/slack-notify/$(params.slack_secret_key)