Skip to content

Instantly share code, notes, and snippets.

Last active June 5, 2023 05:01
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Envoy common features with Slack notifications. See for more info.
@servers(['web' => ' -p 1234'])
$project_name = 'Project Name';
$project_url = '';
$project_root = '/www/project/web';
$slack_hook = 'your-slack-hook-url';
$slack_channel = '#channel';
@task('put_app_up', ['on' => 'web'])
cd {{ $project_root }}
php artisan up
@task('put_app_down', ['on' => 'web'])
cd {{ $project_root }}
php artisan down
@task('pull_latest_changes', ['on' => 'web'])
cd {{ $project_root }}
git pull origin
@task('install_dependencies', ['on' => 'web'])
cd {{ $project_root }}
composer install --prefer-source --no-interaction --no-dev
@task('clear_cache', ['on' => 'web'])
cd {{ $project_root }}
php artisan cache:clear
@slack($slack_hook, $slack_channel, "Envoy task $task ran on <$project_url|[$project_name]>")
Copy link

bigoper commented Nov 4, 2016


On line 50 when executing @slack, I get the slack msg, but the $task is empty...
When I run the following:
I do get the task name in the default msg.
"demo-user ran the [testDomain] task"

Can you assist?

Copy link

mabasic commented Jan 29, 2017

@bigoper Maybe change "Envoy task $task ran on <$project_url|[$project_name]>" to "Envoy task {$task} ran on <{$project_url}|[{$project_name}]>".

Hope it helps!

Copy link

Hello, I have tried with {$task} and it does not work either. I really cant find what's wrong...

Copy link

@finished worked for us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment