Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

laramit's avatar

Envoy task name

I'm using Envoy to stage and deploy to different servers and trying to use Slack to notify me when the task is run. It's all working OK except I'd like the Slack message to include the name of the task. I have a 'stage' task and a 'deploy' task so I'd like the notification to show me which task was run so I need to get the task name into my message string somehow.

I've hunted around and tried the code below but $task just seems to be empty. I've tried {$task} and {{$task}} too but don't seem to be able to get the task name, it's always empty.

@finished
    @slack('https://hooks.slack.com/services/XXXXXXXXXXXXXXXX', '#mychannel',"Envoy task $task ran")
@endfinished

Any ideas?

Thanks.

0 likes
1 reply

Please or to participate in this conversation.