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)
|
|
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
|
Notifies Yammer.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### yammer:notify:success
|
2021-11-21 09:57:58 +00:00
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L95)
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
|
Notifies Yammer about deploy finish.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### yammer:notify:failure
|
2021-11-21 09:57:58 +00:00
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/yammer.php#L114)
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
|
Notifies Yammer about deploy failure.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|