deployer/docs/contrib/yammer.md

121 lines
2.3 KiB
Markdown
Raw Normal View History

2020-10-02 00:11:13 +02:00
<!-- DO NOT EDIT THIS FILE! -->
<!-- Instead edit contrib/yammer.php -->
<!-- Then run bin/docgen -->
# yammer
[Source](/contrib/yammer.php)
# Yammer recipe
## Installing
Require yammer recipe in your `deploy.php` file:
```php
require 'contrib/yammer.php';
```
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 {{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:
```php
before('deploy', 'yammer:notify');
```
If you want to notify about successful end of deployment add this too:
```php
after('success', 'yammer:notify:success');
```
If you want to notify about failed deployment add this too:
```php
after('deploy:failed', 'yammer:notify:failure');
```
* Config
* [`yammer_url`](#yammer_url)
* [`yammer_title`](#yammer_title)
* [`yammer_body`](#yammer_body)
* [`yammer_success_body`](#yammer_success_body)
* [`yammer_failure_body`](#yammer_failure_body)
* Tasks
* [`yammer:notify`](#yammernotify) — Notifying Yammer
* [`yammer:notify:success`](#yammernotifysuccess) — Notifying Yammer about deploy finish
* [`yammer:notify:failure`](#yammernotifyfailure) — Notifying Yammer about deploy failure
## Config
### yammer_url
[Source](/contrib/yammer.php#L63)
### yammer_title
[Source](/contrib/yammer.php#L66)
Title of project
### yammer_body
[Source](/contrib/yammer.php#L71)
Deploy message
### yammer_success_body
[Source](/contrib/yammer.php#L72)
### yammer_failure_body
[Source](/contrib/yammer.php#L73)
## Tasks
### yammer:notify
[Source](/contrib/yammer.php#L76)
### yammer:notify:success
[Source](/contrib/yammer.php#L96)
### yammer:notify:failure
[Source](/contrib/yammer.php#L116)