1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-29 06:34:08 +00:00
catalog/task/send-to-webex-room/0.1
Yulia Gaponenko e96d209bf1 Add platforms annotation to send-to-* tasks
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>
2021-08-31 07:43:14 +01:00
..
README.md Add platforms annotation to send-to-* tasks 2021-08-31 07:43:14 +01:00
send-to-webex-room.yaml Add platforms annotation to send-to-* tasks 2021-08-31 07:43:14 +01:00

Post a message to Webex room

This task posts a simple text message to a Webex room.

send-to-webex-room

This task uses the Messages API of Webex to send a text message. Create a bot as decribed over here.

Install the Task and create a secret

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/send-to-webex-room/0.1/send-to-webex-room.yaml

Create a secret that has the Webex API bot token.

Example webex-token-secret.yaml

kind: Secret
apiVersion: v1
metadata:
  name: webex-token-secret
stringData:
  token: {place token of Bot}

Example kubectl command

kubectl apply -f webex-token-secret.yaml

Parameters

  • webex-token-secret-name: The name of the secret which has the Webex Bot token.

  • message: Plain text message to be posted in the chat.

  • room-id: The ID of the room to send the message. See official documentation or medium article for help to find your ID.

Platforms

The Task can be run on linux/amd64, linux/s390x and linux/ppc64le platforms.

Usage

Example Tekton CLI command

tkn task start send-to-webex-room -p webex-token-secret-name=webex-token-secret -p room-id=test -p message=test

This TaskRun runs the Task to post a message to a Webex room.

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: run-send-to-webex
spec:
  params:
  - name: webex-token-secret-name
    value: webex-token-secret
  - name: message
    value: "Hello from Tekton!"
  - name: room-id
    value: "<your target room ID>"
  taskRef:
    name: send-to-webex-room