mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-21 05:55:35 +00:00
25 lines
601 B
YAML
25 lines
601 B
YAML
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: send-to-webhook-slack
|
|
spec:
|
|
params:
|
|
- name: webhook-secret
|
|
type: string
|
|
description: secret name of the slack app webhook URL (key is url)
|
|
- name: message
|
|
type: string
|
|
description: plain text message
|
|
steps:
|
|
- name: post
|
|
image: curlimages/curl:7.68.0
|
|
script: |
|
|
#!/bin/sh
|
|
/usr/bin/curl -X POST -H 'Content-type: application/json' --data '{"text":"$(params.message)"}' $URL
|
|
env:
|
|
- name: URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: $(params.webhook-secret)
|
|
key: url
|