mirror of
https://github.com/deployphp/deployer.git
synced 2025-01-17 21:48:58 +01:00
4.1 KiB
4.1 KiB
rocketchat
Installing
Create a RocketChat incoming webhook, through the administration panel.
Require the new recipe into your deploy.php
require 'contrib/rocketchat.php';
Add hook on deploy:
before('deploy', 'rocketchat:notify');
Configuration
-
rocketchat_webhook
- incoming rocketchat webook requiredset('rocketchat_webook', 'https://rocketchat.yourcompany.com/hooks/XXXXX');
-
rocketchat_title
- the title of the application, defaults to{{application}}
-
rocketchat_text
- notification messageset('rocketchat_text', '_{{user}}_ deploying {{branch}} to {{target}}');
-
rocketchat_success_text
– success template, default:
set('rocketchat_success_text', 'Deploy to *{{target}}* successful');
rocketchat_failure_text
– failure template, default:
set('rocketchat_failure_text', 'Deploy to *{{target}}* failed');
rocketchat_color
– color's attachmentrocketchat_success_color
– success color's attachmentrocketchat_failure_color
– failure color's attachment
Usage
If you want to notify only about beginning of deployment add this line only:
before('deploy', 'rocketchat:notify');
If you want to notify about successful end of deployment add this too:
after('deploy:success', 'rocketchat:notify:success');
If you want to notify about failed deployment add this too:
after('deploy:failed', 'rocketchat:notify:failure');
Configuration
rockchat_title
rocketchat_icon_emoji
':robot:'
rocketchat_icon_url
null
rocketchat_channel
null
rocketchat_room_id
null
rocketchat_username
null
rocketchat_webhook
null
rocketchat_color
'#000000'
rocketchat_success_color
'#00c100'
rocketchat_failure_color
'#ff0909'
rocketchat_text
'_{{user}}_ deploying `{{branch}}` to *{{target}}*'
rocketchat_success_text
'Deploy to *{{target}}* successful'
rocketchat_failure_text
'Deploy to *{{target}}* failed'
Tasks
rocketchat:notify
Notify RocketChat.
rocketchat:notify:success
Notifying RocketChat about deploy finish.
rocketchat:notify:failure
Notifying RocketChat about deploy failure.