Slack recipe
Installing
Require slack recipe in your deploy.php file:
require 'recipe/slack.php';Add hook on deploy:
before('deploy', 'slack:notify');Configuration
slack_webhook– slack incoming webhook url, requiredslack_title– the title of application, default{{application}}-
slack_text– notification message template, markdown supported_{{user}}_ deploying `{{branch}}` to *{{target}}* -
slack_success_text– success template, default:Deploy to *{{target}}* successful slack_color– color’s attachmentslack_success_color– success color’s attachment
Tasks
slack:notify– send message to slackslack:notify:success– send success message to slack
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('success', 'slack:notify:success');