Hi All
it seems that it is not possible to do such a thing with the slack plugin, the $${DRONE_BRANCH} environment variable is not interpolated, am I doing something wrong ?
slack-post-automerge:
image: plugins/slack
webhook: something
channel: some_channel
username: some_username
template: file:///tmp/$${DRONE_BRANCH}-pr_status.txt
when:
event: [push]
branch:
include: [some_branch]
volumes:
- /tmp:/tmp
I also tried this variation without more success;
slack-post-automerge:
image: plugins/slack
webhook: something
channel: some_channel
username: some_username
template: file:///tmp/{{ build.branch }}-pr_status.txt
when:
event: [push]
branch:
include: [some_branch]
volumes:
- /tmp:/tmp
EDIT: Solved using following syntax
slack-post-automerge:
image: plugins/slack
webhook: something
channel: some_channel
username: some_username
template: file:///tmp/${DRONE_BRANCH}-pr_status.txt
when:
event: [push]
branch:
include: [some_branch]
volumes:
- /tmp:/tmp