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

3.8 KiB
Raw Blame History

cimonitor

Source

CIMonitor recipe

Monitor your deployments on CIMonitor.

CIMonitorGif

Require cimonitor recipe in your deploy.php file:

require 'contrib/cimonitor.php';

Add tasks on deploy:

before('deploy', 'cimonitor:notify');
after('success', 'cimonitor:notify:success');
after('deploy:failed', 'cimonitor:notify:failure');

Configuration

  • cimonitor_webhook CIMonitor server webhook url, required
    set('cimonitor_webhook', 'https://cimonitor.enrise.com/webhook/deployer');
    
  • cimonitor_title the title of application, default the username\reponame combination from {{repository}}
    set('cimonitor_title', '');
    
  • cimonitor_user User object with name and email, default gets information from git config
    set('cimonitor_user', function () {
      return [
        'name' => 'John Doe',
        'email' => 'john@enrise.com',
      ];
    });
    

Various cimonitor statusses are set, in case you want to change these yourselves. See the CIMonitor documentation for the usages of different states.

Usage

If you want to notify only about beginning of deployment add this line only:

before('deploy', 'cimonitor:notify');

If you want to notify about successful end of deployment add this too:

after('success', 'cimonitor:notify:success');

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

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

Config

cimonitor_title

Source

Title of project based on git repo

cimonitor_user

Source

cimonitor_status_info

Source

CI monitor status states and job states

cimonitor_status_warning

Source

cimonitor_status_error

Source

cimonitor_status_success

Source

cimonitor_job_state_info

Source

cimonitor_job_state_pending

Source

cimonitor_job_state_running

Source

cimonitor_job_state_warning

Source

cimonitor_job_state_error

Source

cimonitor_job_state_success

Source

Tasks

cimonitor:notify

Source

cimonitor:notify:success

Source

cimonitor:notify:failure

Source