Closed juvarabrera closed 2 weeks ago
You cannot use bash in the parameters, the $(cat message.txt)
is managed as a string and the orb is not designed to eval this.
You can get the value from a file though, you have two options:
Sorry, I forgot about this issue. I've fixed it using the following
...
- run:
name: Generate E2E Error Message
when: on_fail
command: |
...
echo 'export MESSAGE="$(cat message.json)"' >> $BASH_ENV
- notify_on_e2e_fail: # my own command
channel: << parameters.slack_channel >>
template: MESSAGE
...
https://discuss.circleci.com/t/exporting-environment-variables-from-sourced-scripts/4564/4
Orb version:
4.9.3
What happened:
I'm trying to pass a custom message to slack orb. The custom message is already in json format
Expected behavior:
Should send the message in the Slack channel
Additional Information:
.circleci/config.yml
This is the value of
message.txt
There are no issues in the Slack Block Kit Builder
This is the output of Slack orb:
Is this even possible? Because I tried to pass the json string manually like this and it worked.
I feel like it has something to do with this specific line
I also tried
Thank you for checking 🙇