mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-21 05:55:35 +00:00
e294e1246b
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: https://github.com/tektoncd/hub/pull/539 This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization. |
||
---|---|---|
.. | ||
README.md | ||
send-to-telegram.yaml |
Post a message to telegram
These tasks post a simple message to a telegram chat.
send-to-telegram
This task uses the Bot API of telegram to send a message. Create a bot as decribed over here.
Install the Task and create a secret
kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/send-to-telegram/0.1/raw
Create a secret that has bot token.
Example telegram-bot-token-secret.yaml
kind: Secret
apiVersion: v1
metadata:
name: telegram-bot-token-secret
stringData:
token: {token over here}
Example kubectl command
kubectl apply -f telegram-bot-token-secret.yaml
Parameters
-
bot-token-secret: The name of the secret that has the bot token.
-
message: Plain text message to be posted in the chat.
-
chat-id: The ID of the chat to send the message towards. See telegram documentation to get the correct ID.
Platforms
The Task can be run on linux/amd64
, linux/s390x
and linux/ppc64le
platforms.
Usage
This TaskRun runs the Task to post a message to the the chat channel.
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: run-send-to-telegram
spec:
params:
- name: bot-token-secret
value: telegram-bot-token-secret
- name: message
value: "Hello from Tekton!"
- name: chat-id
value: "<your chat ID over here>"
taskRef:
name: send-to-telegram