mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-22 06:02:51 +00:00
d93795673c
And update references to community, pipeline, etc. too. Signed-off-by: Vincent Demeester <vdemeest@redhat.com> |
||
---|---|---|
.. | ||
README.md | ||
send-to-webex-room.yaml |
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