0

I have the .txt and I am showing the content of file in slack using Bitbucket pipeline using the command below:

  - pipe: atlassian/slack-notify:2.0.1
             variables:
              WEBHOOK_URL: 'https://hooks.slack.com/services/00000/00000/0000'
              MESSAGE: $(cat log.txt)

However, I want to show the content in code block and now trying to have PAYLOAD. Here is the code from payload:

{
    "blocks": [
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "```echo $(cat log.txt)```"
            }
        }
    ]
}

In the text, it is showing as it is "echo $(cat log.txt)" as a text instead of showing file content. What is the way of showing file content in the payload? Any help would be appreciated.

Smh
  • 113
  • 1
  • 6

0 Answers0