mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-21 05:55:35 +00:00
e96d209bf1
Annotation about linux/amd64, linux/s390x, and linux/ppc64le platforms is added to the latest versions of the send-to-* tasks. Curl image used in the tasks is upgraded from 7.68.0 to 7.70.0 to use multi-arch version. Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: send-to-microsoft-teams
|
|
labels:
|
|
app.kubernetes.io/version: "0.1"
|
|
annotations:
|
|
tekton.dev/pipelines.minVersion: "0.12.1"
|
|
tekton.dev/categories: Messaging
|
|
tekton.dev/tags: messaging
|
|
tekton.dev/displayName: "Send message to Microsoft Teams Channel"
|
|
tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le"
|
|
spec:
|
|
description: >-
|
|
These tasks post a simple message to a Microsoft Teams Channel.
|
|
|
|
This task uses the Incoming Webhook functionality of Microsoft Teams
|
|
|
|
params:
|
|
- name: webhook-url-secret
|
|
type: string
|
|
description: Name of the secret with incoming webhook URL
|
|
- name: webhook-url-secret-key
|
|
type: string
|
|
description: Key in the secret
|
|
- name: message
|
|
type: string
|
|
description: The message to notify about
|
|
steps:
|
|
- name: post
|
|
image: docker.io/curlimages/curl:7.70.0@sha256:031df77a11e5edded840bc761a845eab6e3c2edee22669fb8ad6d59484b6a1c4 #tag: 7.70.0
|
|
script: |
|
|
#!/usr/bin/env sh
|
|
MESSAGE=$(echo "${MESSAGE}" | sed -e 's/\"/\\\\"/g')
|
|
JSON="{\"text\": \"${MESSAGE}\" }"
|
|
curl -X POST -H 'Content-Type: application/json' -d "${JSON}" "${WEBHOOK_URL}"
|
|
env:
|
|
- name: WEBHOOK_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: $(params.webhook-url-secret)
|
|
key: $(params.webhook-url-secret-key)
|
|
- name: MESSAGE
|
|
value: $(params.message)
|