Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
13.6K

Send a Telegram message telegram

Send any message to a Telegram channel or user.

arguments

  • telegram_images - An array of local or web paths for images to be attached to the message
  • telegram_message - Overrides the message text to be sent. Handlebar templates are supported (see README for details)
  • telegram_to - An array of user ids, who will receive a message
  • telegram_token - The token of your Telegram bot
    sendMessage:
  type: telegram
  title: |-
    Sends a notification with information about the current build.
    Requires a git trigger
  arguments:
    telegram_token: '${{TOKEN}}'
    telegram_to:
      - 99999999

  
    sendMessage:
  type: telegram
  title: |-
    Sends a notification with your customized message
    and images to be attached
  arguments:
    telegram_token: '${{TOKEN}}'
    telegram_to:
      - 99999999
    telegram_message: >-
      Hello, how are you? There was a build triggered by ${{CF_BUILD_INITIATOR}}

      You could see the build [here](${{CF_BUILD_URL}}) and the commit
      [here](${{CF_COMMIT_URL}})
    telegram_images:
      - 'https://codefresh.io/docs/assets/brand/codefresh-social.png'

  
github.com
Andrii Shaforostov
May 11, 2020