deployer/docs/contrib/yammer.md

143 lines
2.7 KiB
Markdown
Raw Normal View History

2021-09-26 15:25:58 +02:00
<!-- DO NOT EDIT THIS FILE! -->
<!-- Instead edit contrib/yammer.php -->
<!-- Then run bin/docgen -->
# yammer
[Source](/contrib/yammer.php)
2021-11-06 19:02:51 +01:00
2021-09-26 15:25:58 +02:00
# 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('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](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L63)
```php title="Default value"
'https://www.yammer.com/api/v1/messages.json'
```
### yammer_title
[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L66)
Title of project
### yammer_body
[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L71)
Deploy message
```php title="Default value"
'<em>{{user}}</em> deploying {{branch}} to <strong>{{target}}</strong>'
```
### yammer_success_body
[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L72)
```php title="Default value"
'Deploy to <strong>{{target}}</strong> successful'
```
### yammer_failure_body
[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L73)
```php title="Default value"
'Deploy to <strong>{{target}}</strong> failed'
```
## Tasks
### yammer:notify
[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L76)
Notifying Yammer.
### yammer:notify:success
[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L96)
Notifying Yammer about deploy finish.
### yammer:notify:failure
[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L116)
Notifying Yammer about deploy failure.