Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Commit

Permalink
Added note about current bug with autoload (#178)
Browse files Browse the repository at this point in the history
* Added note about current bug with autoload

I added a note + temporary workaround for deployphp/deployer#1371 so that users don't have to waste time figuring out why this isn't working currently. This will be reverted hopefully once v7 is released with a fix.
I also added better examples to the configurations so that new users would know exactly how to use the commands.

* Fixed typo

removed extra 'required' which was a typo.
  • Loading branch information
XanderLuciano authored and antonmedv committed Apr 17, 2018
1 parent 9f58553 commit be3d2f5
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions docs/slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@

<a href="https://slack.com/oauth/authorize?&client_id=113734341365.225973502034&scope=incoming-webhook"><img alt="Add to Slack" height="40" width="139" src="https://platform.slack-edge.com/img/add_to_slack.png" srcset="https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/add_to_slack@2x.png 2x" /></a>

Require slack recipe in your `deploy.php` file:
Install recipes through composer:
```
composer require deployer/recipes --dev
```

Require slack recipe in your `deploy.php` file:
**note:** currently there is a bug in the autoloader detection requiring users to specify the full path ([more info](https://github.com/deployphp/deployer/issues/1371)).

```php
require 'recipe/slack.php';
//require 'recipe/slack.php';
require 'vendor/deployer/recipe/recipes/slack.php';
```

Add hook on deploy:
Expand All @@ -19,18 +26,21 @@ before('deploy', 'slack:notify');
## Configuration

- `slack_webhook` – slack incoming webhook url, **required**
```
set('slack_webhook', 'https://hooks.slack.com/...');
```
- `slack_title` – the title of application, default `{{application}}`
- `slack_text` – notification message template, markdown supported
```
_{{user}}_ deploying `{{branch}}` to *{{target}}*
set('slack_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
```
- `slack_success_text` – success template, default:
```
Deploy to *{{target}}* successful
set('slack_success_text', 'Deploy to *{{target}}* successful');
```
- `slack_failure_text` – failure template, default:
```
Deploy to *{{target}}* failed
set('slack_failure_text', 'Deploy to *{{target}}* failed');
```

- `slack_color` – color's attachment
Expand Down

0 comments on commit be3d2f5

Please sign in to comment.