1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
catalog/task/send-to-webex-room/0.1
Vincent Demeester d93795673c Update self reference from master to main 🧙
And update references to community, pipeline, etc. too.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2021-03-19 11:09:49 +00:00
..
README.md Update self reference from master to main 🧙 2021-03-19 11:09:49 +00:00
send-to-webex-room.yaml Fix Catlin error by adding Digest to the Images 2020-10-26 09:03:20 +00: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.

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