Skip to content

Commit

Permalink
Add a slack_skip_notification environment variable to disable notific…
Browse files Browse the repository at this point in the history
…ations in the slack task
  • Loading branch information
Peter Siska committed Nov 14, 2016
1 parent c66c3bd commit 1be1412
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
require 'vendor/deployer/recipes/slack.php';
```

### Environmental variables

- **slack_skip_notification** - Skips the entire task when set to `true`. This is particularly useful if you want to disable slack notifications for certain stages.

### Configuration options

- **slack** *(required)*: accepts an *array* with the api token and team name. Token can be generated on [slack api website](https://api.slack.com/docs/oauth-test-tokens).
Expand Down
4 changes: 4 additions & 0 deletions slack.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

desc('Notifying Slack channel of deployment');
task('deploy:slack', function () {
if (true === env('slack_skip_notification')) {
return;
}

global $php_errormsg;

$defaultConfig = [
Expand Down

0 comments on commit 1be1412

Please sign in to comment.