Slack Notification with YAML

YAML parameters for Slack Notification

NameTypeDescription
action RequiredStringThe ID of the action.
type RequiredStringThe type of the action. Should be set to SLACK.
channel RequiredStringThe ID of the Slack channel. More info here.
integration RequiredStringThe ID of the integration.
content RequiredStringThe content of the notification.
attachmentsString[]The array of the Slack message attachments. More info here.
file_attachmentsString[]The attached files.

YAML example for Slack Notification

yaml
actions: - action: "Send notification to deploys channel" type: "SLACK" content: "[#${BUDDY_RUN_ID}] ${BUDDY_PIPELINE_NAME} execution by <${BUDDY_INVOKER_URL}|${BUDDY_INVOKER_NAME}>" channel: "C0GAADCCL" attachments: - "{\"fallback\":\"${BUDDY_PIPELINE_NAME} execution #${BUDDY_RUN_ID}\",\"color\":\"${good}\",\"fields\":[{\"title\":\"Successful execution\",\"value\":\"<${BUDDY_RUN_URL}|Execution #${BUDDY_RUN_ID} ${BUDDY_RUN_COMMENT}>\",\"short\":true},{\"title\":\"Pipeline\",\"value\":\"<${BUDDY_PIPELINE_URL}|${BUDDY_PIPELINE_NAME}>\",\"short\":true},{\"title\":\"Branch\",\"value\":\"${BUDDY_RUN_BRANCH}\",\"short\":true},{\"title\":\"Project\",\"value\":\"<${BUDDY_PROJECT_URL}|${BUDDY_PROJECT_NAME}>\",\"short\":true}]}" integration: "my_integration" variables: - key: "color" value: "good" file_attachments: - "fs:///file1" - "fs:///file2"

Last modified on Oct 29, 2024