mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 17:22:41 +01:00
121 lines
3.1 KiB
Markdown
121 lines
3.1 KiB
Markdown
<!-- 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('deploy: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](https://github.com/deployphp/deployer/search?q=yammer_url+in%3Afile+language%3Aphp+path%3Acontrib+filename%3Ayammer.php)
|
||
|
||
|
||
|
||
### yammer_title
|
||
[Source](https://github.com/deployphp/deployer/search?q=yammer_title+in%3Afile+language%3Aphp+path%3Acontrib+filename%3Ayammer.php)
|
||
|
||
Title of project
|
||
|
||
### yammer_body
|
||
[Source](https://github.com/deployphp/deployer/search?q=yammer_body+in%3Afile+language%3Aphp+path%3Acontrib+filename%3Ayammer.php)
|
||
|
||
Deploy message
|
||
|
||
### yammer_success_body
|
||
[Source](https://github.com/deployphp/deployer/search?q=yammer_success_body+in%3Afile+language%3Aphp+path%3Acontrib+filename%3Ayammer.php)
|
||
|
||
|
||
|
||
### yammer_failure_body
|
||
[Source](https://github.com/deployphp/deployer/search?q=yammer_failure_body+in%3Afile+language%3Aphp+path%3Acontrib+filename%3Ayammer.php)
|
||
|
||
|
||
|
||
|
||
## Tasks
|
||
### yammer:notify
|
||
[Source](https://github.com/deployphp/deployer/search?q=yammer%3Anotify+in%3Afile+language%3Aphp+path%3Acontrib+filename%3Ayammer.php)
|
||
|
||
|
||
|
||
### yammer:notify:success
|
||
[Source](https://github.com/deployphp/deployer/search?q=yammer%3Anotify%3Asuccess+in%3Afile+language%3Aphp+path%3Acontrib+filename%3Ayammer.php)
|
||
|
||
|
||
|
||
### yammer:notify:failure
|
||
[Source](https://github.com/deployphp/deployer/search?q=yammer%3Anotify%3Afailure+in%3Afile+language%3Aphp+path%3Acontrib+filename%3Ayammer.php)
|
||
|
||
|
||
|