docs/contrib/rocketchat.md
require 'contrib/rocketchat.php';
Create a RocketChat incoming webhook, through the administration panel. Add hook on deploy:
before('deploy', 'rocketchat:notify');
rocketchat_webhook - incoming rocketchat webook required
set('rocketchat_webhook', 'https://rocketchat.yourcompany.com/hooks/XXXXX');
rocketchat_title - the title of the application, defaults to {{application}}rocketchat_text - notification message
set('rocketchat_text', '_{{user}}_ deploying {{what}} to {{where}}');
rocketchat_success_text – success template, default:set('rocketchat_success_text', 'Deploy to *{{where}}* successful');
rocketchat_failure_text – failure template, default:set('rocketchat_failure_text', 'Deploy to *{{where}}* failed');
rocketchat_color – color's attachmentrocketchat_success_color – success color's attachmentrocketchat_failure_color – failure color's attachmentIf 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');
return get('application', 'Project');
':robot:'
null
null
null
null
null
'#000000'
'#00c100'
'#ff0909'
'_{{user}}_ deploying `{{what}}` to *{{where}}*'
'Deploy to *{{where}}* successful'
'Deploy to *{{where}}* failed'
Notifies RocketChat.
Notifies RocketChat about deploy finish.
Notifies RocketChat about deploy failure.