Skip to main content
Version: 7.x

rocketchat

Source

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 required

    set('rocketchat_webook', '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 {{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 attachment

  • rocketchat_success_color โ€“ success color's attachment

  • rocketchat_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

Source

rocketchat_icon_emoji

Source

Default value
':robot:'

rocketchat_icon_url

Source

Default value
null

rocketchat_channel

Source

Default value
null

rocketchat_room_id

Source

Default value
null

rocketchat_username

Source

Default value
null

rocketchat_webhook

Source

Default value
null

rocketchat_color

Source

Default value
'#000000'

rocketchat_success_color

Source

Default value
'#00c100'

rocketchat_failure_color

Source

Default value
'#ff0909'

rocketchat_text

Source

Default value
'_{{user}}_ deploying `{{branch}}` to *{{target}}*'

rocketchat_success_text

Source

Default value
'Deploy to *{{target}}* successful'

rocketchat_failure_text

Source

Default value
'Deploy to *{{target}}* failed'

Tasks

rocketchat:notify

Source

Notifies RocketChat.

rocketchat:notify:success

Source

Notifies RocketChat about deploy finish.

rocketchat:notify:failure

Source

Notifies RocketChat about deploy failure.



Support Deployer โค๏ธ

Hello, my name is Anton Medvedev (@antonmedv). I'm the creator of the Deployer. I maintain this open source project in my spare time. Supporters on GitHub give me extra motivation to work on the project.

Consider supporting Deployer via GitHub Sponsors.

Also, please, nominate me for GitHub Stars award. Thanks!