You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
https://bitbucket.org/atlassian/slack-notify/src/master/
Currently, we're using the slack notify pipe in order to add additional context. This pipe provides a way of providing a simple message, or a Block Kit style message.
However, what we typically want to do is provide a multi-line plain-text file as part of the message.
Unfortunately, this is somewhat of a tricky thing to do, as the naive approach with the `MESSAGE` parameter and `PAYLOAD_FILES` can be difficult.
Example 1: using the MESSAGE parameter
- pipe: atlassian/slack-notify:1.0.2
variables:
WEBHOOK_URL: $SLACK_WEBHOOK_URL
PRETEXT: 'Releasing!'
MESSAGE: >
$(cat output.txt)
I believe this does not work as output.txt ends up breaking interpretation of the yaml file.
Example 2: using the PAYLOAD_FILES parameter
Using this parameter requires massaging this multi-line file in order to get it to show up, and can be quite confusing without dropping into a full programming language.
My request
It would be nice if the documentation provided an example which demonstrates how to provide a simple multi-line text file as either a MESSAGE parameter or a the PAYLOAD_FILES, or add a new parameter to support the common case of wanting to provide a text file as a message in slack.
@Will Marsman hi. Thanks for your suggestion.
To cover your case check this reference of how to attach file.
Regards, Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.