Back to Deployer

Yammer Recipe

docs/contrib/yammer.md

8.0.32.7 KB
Original Source
<!-- DO NOT EDIT THIS FILE! --> <!-- Instead edit contrib/yammer.php --> <!-- Then run bin/docgen -->

Yammer Recipe

php
require 'contrib/yammer.php';

Source

Add hook on deploy:

php
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 {{what}} to <strong>{{where}}</strong>
    
  • yammer_success_body – success template, default:
    Deploy to <strong>{{where}}</strong> successful
    
  • yammer_failure_body – failure template, default:
    Deploy to <strong>{{where}}</strong> failed
    

Usage

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

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

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

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

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

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

Configuration

yammer_url

Source

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

yammer_title

Source

Title of project

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

yammer_body

Source

Deploy message

php
'<em>{{user}}</em> deploying {{what}} to <strong>{{where}}</strong>'

yammer_success_body

Source

php
'Deploy to <strong>{{where}}</strong> successful'

yammer_failure_body

Source

php
'Deploy to <strong>{{where}}</strong> failed'

Tasks

yammer:notify {#yammer-notify}

Source

Notifies Yammer.

yammer:notify:success {#yammer-notify-success}

Source

Notifies Yammer about deploy finish.

yammer:notify:failure {#yammer-notify-failure}

Source

Notifies Yammer about deploy failure.