github.com/kubeshop/testkube@v1.17.23/config/slack-template.json (about) 1 { 2 "blocks": [ 3 { 4 "type": "section", 5 "text": { 6 "type": "plain_text", 7 "emoji": true, 8 "text": "Execution {{ .ExecutionName }} of {{ .TestName }} status {{ .Status }}" 9 } 10 }, 11 { 12 "type": "context", 13 "elements": [ 14 { 15 "type": "image", 16 "image_url": "{{ if eq .Status "failed" }}https://raw.githubusercontent.com/kubeshop/testkube/d3380bc4bf4534ef1fb88cdce5d346dca8898986/assets/imageFailed.png{{ else if eq .Status "passed" }}https://raw.githubusercontent.com/kubeshop/testkube/d3380bc4bf4534ef1fb88cdce5d346dca8898986/assets/imagePassed.png{{ else }}https://raw.githubusercontent.com/kubeshop/testkube/d3380bc4bf4534ef1fb88cdce5d346dca8898986/assets/imagePending.png{{ end }}", 17 "alt_text": "notifications warning icon" 18 } 19 {{ if (gt .TotalSteps 0 )}} 20 , 21 { 22 "type": "mrkdwn", 23 "text": "* {{ .FailedSteps }}/{{ .TotalSteps }} STEPS FAILED*" 24 } 25 {{ end }} 26 ] 27 }, 28 { 29 "type": "divider" 30 }, 31 { 32 "type": "section", 33 "fields": [ 34 { 35 "type": "mrkdwn", 36 "text": "*Test Name*" 37 }, 38 { 39 "type": "mrkdwn", 40 "text": "*Type*" 41 }, 42 { 43 "type": "plain_text", 44 "text": "{{ .TestName }}", 45 "emoji": true 46 }, 47 { 48 "type": "plain_text", 49 "text": "{{ .TestType }}", 50 "emoji": true 51 } 52 ] 53 }, 54 {{ if .Namespace}} 55 { 56 "type": "section", 57 "fields": [ 58 { 59 "type": "mrkdwn", 60 "text": "*Namespace*" 61 }, 62 { 63 "type": "mrkdwn", 64 "text": "*Labels*" 65 }, 66 { 67 "type": "plain_text", 68 "text": "{{ .Namespace }} ", 69 "emoji": true 70 }, 71 { 72 "type": "plain_text", 73 "text": "{{ .Labels }} ", 74 "emoji": true 75 } 76 ] 77 }, 78 {{ end }} 79 { 80 "type": "section", 81 "fields": [ 82 { 83 "type": "mrkdwn", 84 "text": "*Start Time*" 85 }, 86 { 87 "type": "mrkdwn", 88 "text": "*End Time*" 89 }, 90 { 91 "type": "plain_text", 92 "text": "{{ .StartTime }}", 93 "emoji": true 94 }, 95 { 96 "type": "plain_text", 97 "text": "{{ .EndTime }}", 98 "emoji": true 99 } 100 ] 101 }, 102 {{ if .Duration }} 103 { 104 "type": "section", 105 "fields": [ 106 { 107 "type": "mrkdwn", 108 "text": "*Duration*" 109 }, 110 { 111 "type": "mrkdwn", 112 "text": " " 113 }, 114 { 115 "type": "plain_text", 116 "text": "{{ .Duration }}", 117 "emoji": true 118 } 119 ] 120 }, 121 {{ end }} 122 { 123 "type": "divider" 124 }, 125 {{ if .ClusterName }} 126 { 127 "type": "section", 128 "text": { 129 "type": "mrkdwn", 130 "text": "Cluster Name: {{ .ClusterName }}" 131 } 132 }, 133 {{ end }} 134 { 135 "type": "section", 136 "text": { 137 "type": "mrkdwn", 138 "text": "*Test Execution CLI*" 139 } 140 }, 141 { 142 "type": "section", 143 "text": { 144 "type": "mrkdwn", 145 "text": "`kubectl testkube get execution {{ .ExecutionName }} `\n" 146 } 147 }, 148 {{ if eq .TestType "Test Suite" }} 149 { 150 "type": "section", 151 "text": { 152 "type": "mrkdwn", 153 "text": "Test Suite URI: {{ .DashboardURI }}/test-suites/{{ .TestName }}" 154 } 155 }, 156 { 157 "type": "section", 158 "text": { 159 "type": "mrkdwn", 160 "text": "Test Suite Execution URI: {{ .DashboardURI }}/test-suites/{{ .TestName }}/executions/{{ .ExecutionID }}" 161 } 162 }, 163 {{ else }} 164 { 165 "type": "section", 166 "text": { 167 "type": "mrkdwn", 168 "text": "Test URI: {{ .DashboardURI }}/tests/{{ .TestName }}" 169 } 170 }, 171 { 172 "type": "section", 173 "text": { 174 "type": "mrkdwn", 175 "text": "Test Execution URI: {{ .DashboardURI }}/tests/{{ .TestName }}/executions/{{ .ExecutionID }}" 176 } 177 }, 178 {{ end }} 179 { 180 "type": "divider" 181 } 182 ] 183 }