baachi / deployer-rocketchat-recipe
Recipe for deployerphp to send notifications to rocketchat
Requires
- php: ~7.0
Requires (Dev)
- deployer/deployer: ^6.3
This package is auto-updated.
Last update: 2022-08-04 18:02:53 UTC
README
⚠️ This package is abandoned, please use the offical recipe.
Installing
Create a RockChat incoming webhook, through the administration panel.
Install this recipie through composer:
$ composer require baachi/rocketchat-recipe
Require the new recipe into your deploy.php
require 'vendor/baachi/rocketchat-recipe/rockchat.php';
Add hook on deploy:
before('deploy', 'rockchat: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
Tasks
rocketchat:notify
– send message to rocketchatrocketchat:notify:success
– send success message to rocketchatrocketchat:notify:failure
– send failure message to rocketchat
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('success', 'rocketchat:notify:success');
If you want to notify about failed deployment add this too:
after('deploy:failed', 'rocketchat:notify:failure');