5.1 KiB
slack
Installing
Require slack recipe in your deploy.php
file:
require 'contrib/slack.php';
Add hook on deploy:
before('deploy', 'slack:notify');
Configuration
-
slack_webhook
– slack incoming webhook url, requiredset('slack_webhook', 'https://hooks.slack.com/...');
-
slack_channel
- channel to send notification to. The default is the channel configured in the webhook -
slack_title
– the title of application, default{{application}}
-
slack_text
– notification message template, markdown supportedset('slack_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
-
slack_success_text
– success template, default:set('slack_success_text', 'Deploy to *{{target}}* successful');
-
slack_failure_text
– failure template, default:set('slack_failure_text', 'Deploy to *{{target}}* failed');
-
slack_color
– color's attachment -
slack_success_color
– success color's attachment -
slack_failure_color
– failure color's attachment
Usage
If you want to notify only about beginning of deployment add this line only:
before('deploy', 'slack:notify');
If you want to notify about successful end of deployment add this too:
after('deploy:success', 'slack:notify:success');
If you want to notify about failed deployment add this too:
after('deploy:failed', 'slack:notify:failure');
- Config
- Tasks
slack:notify
— Notifying Slackslack:notify:success
— Notifying Slack about deploy finishslack:notify:failure
— Notifying Slack about deploy failureslack:notify:rollback
— Notifying Slack about rollback
Config
slack_channel
Channel to publish to, when null the default change of the webhook will be used
slack_title
Title of project
slack_text
Deploy message
slack_success_text
slack_failure_text
slack_rollback_text
slack_color
Color of attachment