deployer/docs/contrib/yammer.md
Anton Medvedev 6113e5e4f5 Improve docs
2022-09-12 12:53:42 +02:00

2.7 KiB
Raw Blame History

Yammer Recipe

require 'contrib/yammer.php';

Source

Add hook on deploy:

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

Configuration

  • yammer_url The URL to the message endpoint, default is https://www.yammer.com/api/v1/messages.json
  • yammer_token (required) Yammer auth token
  • yammer_group_id (required) - Group ID
  • yammer_title the title of application, default {{application}}
  • yammer_body notification message template, default:
    <em>{{user}}</em> deploying {{branch}} to <strong>{{target}}</strong>
    
  • yammer_success_body success template, default:
    Deploy to <strong>{{target}}</strong> successful
    
  • yammer_failure_body failure template, default:
    Deploy to <strong>{{target}}</strong> failed
    

Usage

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

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

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

after('deploy:success', 'yammer:notify:success');

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

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

Configuration

yammer_url

Source

'https://www.yammer.com/api/v1/messages.json'

yammer_title

Source

Title of project

return get('application', 'Project');

yammer_body

Source

Deploy message

'<em>{{user}}</em> deploying {{branch}} to <strong>{{target}}</strong>'

yammer_success_body

Source

'Deploy to <strong>{{target}}</strong> successful'

yammer_failure_body

Source

'Deploy to <strong>{{target}}</strong> failed'

Tasks

yammer:notify

Source

Notifies Yammer.

yammer:notify:success

Source

Notifies Yammer about deploy finish.

yammer:notify:failure

Source

Notifies Yammer about deploy failure.