deployer/docs/contrib/rocketchat.md
Anton Medvedev 47a193f9af
Add docgen
2020-10-02 01:11:13 +03:00

3.6 KiB
Raw Blame History

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('success', 'rocketchat:notify:success');

If you want to notify about failed deployment add this too:

after('deploy:failed', 'rocketchat:notify:failure');

Config

rockchat_title

Source

rocketchat_icon_emoji

Source

rocketchat_icon_url

Source

rocketchat_channel

Source

rocketchat_room_id

Source

rocketchat_username

Source

rocketchat_webhook

Source

rocketchat_color

Source

rocketchat_success_color

Source

rocketchat_failure_color

Source

rocketchat_text

Source

rocketchat_success_text

Source

rocketchat_failure_text

Source

Tasks

rocketchat:notify

Source

rocketchat:notify:success

Source

rocketchat:notify:failure

Source