Skip to content

Commit 0d52f87

Browse files
authoredSep 21, 2022
test: Tekton Notify to Slack on Success (#2538)
1 parent 81453e0 commit 0d52f87

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed
 

‎test/suites/common/suite.yaml

+13-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,16 @@ spec:
6363
- name: webhook-secret
6464
value: slack-webhook-secret
6565
- name: message
66-
value: $(context.pipelineRun.name) has failed
66+
value: ":x: $(context.pipelineRun.name) has failed"
67+
- name: notify-build-success
68+
when:
69+
- input: $(tasks.status)
70+
operator: in
71+
values: ["Succeeded", "Completed"]
72+
taskRef:
73+
name: notify-slack
74+
params:
75+
- name: webhook-secret
76+
value: slack-webhook-secret
77+
- name: message
78+
value: ":white_check_mark: $(context.pipelineRun.name) has succeeded"

‎test/suites/upgrade/pipeline.yaml

+13-1
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,16 @@ spec:
9999
- name: webhook-secret
100100
value: slack-webhook-secret
101101
- name: message
102-
value: $(context.pipelineRun.name) has failed
102+
value: ":x: $(context.pipelineRun.name) has failed"
103+
- name: notify-build-success
104+
when:
105+
- input: $(tasks.status)
106+
operator: in
107+
values: ["Succeeded", "Completed"]
108+
taskRef:
109+
name: notify-slack
110+
params:
111+
- name: webhook-secret
112+
value: slack-webhook-secret
113+
- name: message
114+
value: ":white_check_mark: $(context.pipelineRun.name) has succeeded"

0 commit comments

Comments
 (0)
Please sign in to comment.