Skip to content

Commit 492078b

Browse files
committed
Add new config options: {{what}} and {{where}}
1 parent 5cefd19 commit 492078b

24 files changed

+174
-123
lines changed

contrib/discord.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
1616
- `discord_notify_text` – notification message template, markdown supported, default:
1717
```markdown
18-
:information_source: **{{user}}** is deploying branch `{{branch}}` to _{{target}}_
18+
:information_source: **{{user}}** is deploying branch `{{branch}}` to _{{where}}_
1919
```
2020
- `discord_success_text` – success template, default:
2121
```markdown
22-
:white_check_mark: Branch `{{branch}}` deployed to _{{target}}_ successfully
22+
:white_check_mark: Branch `{{branch}}` deployed to _{{where}}_ successfully
2323
```
2424
- `discord_failure_text` – failure template, default:
2525
```markdown
26-
:no_entry_sign: Branch `{{branch}}` has failed to deploy to _{{target}}_
26+
:no_entry_sign: Branch `{{branch}}` has failed to deploy to _{{where}}_
2727
2828
## Usage
2929
@@ -58,17 +58,17 @@
5858
// Deploy messages
5959
set('discord_notify_text', function () {
6060
return [
61-
'text' => parse(':information_source: **{{user}}** is deploying branch `{{branch}}` to _{{target}}_'),
61+
'text' => parse(':information_source: **{{user}}** is deploying branch `{{what}}` to _{{where}}_'),
6262
];
6363
});
6464
set('discord_success_text', function () {
6565
return [
66-
'text' => parse(':white_check_mark: Branch `{{branch}}` deployed to _{{target}}_ successfully'),
66+
'text' => parse(':white_check_mark: Branch `{{what}}` deployed to _{{where}}_ successfully'),
6767
];
6868
});
6969
set('discord_failure_text', function () {
7070
return [
71-
'text' => parse(':no_entry_sign: Branch `{{branch}}` has failed to deploy to _{{target}}_'),
71+
'text' => parse(':no_entry_sign: Branch `{{what}}` has failed to deploy to _{{where}}_'),
7272
];
7373
});
7474

contrib/hipchat.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
- `hipchat_token` – Hipchat V1 auth token
66
- `hipchat_room_id` – Room ID or name
7-
- `hipchat_message` – Deploy message, default is `_{{user}}_ deploying `{{branch}}` to *{{target}}*`
7+
- `hipchat_message` – Deploy message, default is `_{{user}}_ deploying `{{what}}` to *{{where}}*`
88
- `hipchat_from` – Default to target
99
- `hipchat_color` – Message color, default is **green**
1010
- `hipchat_url` – The URL to the message endpoint, default is https://api.hipchat.com/v1/rooms/message
@@ -24,8 +24,8 @@
2424
use Deployer\Utility\Httpie;
2525

2626
set('hipchat_color', 'green');
27-
set('hipchat_from', '{{target}}');
28-
set('hipchat_message', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
27+
set('hipchat_from', '{{where}}');
28+
set('hipchat_message', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
2929
set('hipchat_url', 'https://api.hipchat.com/v1/rooms/message');
3030

3131
desc('Notifies Hipchat channel of deployment');

contrib/mattermost.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@
3434
3535
- `mattermost_text` - notification message
3636
```
37-
set('mattermost_text', '_{{user}}_ deploying `{{branch}}` to **{{target}}**');
37+
set('mattermost_text', '_{{user}}_ deploying `{{what}}` to **{{where}}**');
3838
```
3939
4040
- `mattermost_success_text` – success template, default:
4141
```
42-
set('mattermost_success_text', 'Deploy to **{{target}}** successful {{mattermost_success_emoji}}');
42+
set('mattermost_success_text', 'Deploy to **{{where}}** successful {{mattermost_success_emoji}}');
4343
```
4444
4545
- `mattermost_failure_text` – failure template, default:
4646
```
47-
set('mattermost_failure_text', 'Deploy to **{{target}}** failed {{mattermost_failure_emoji}}');
47+
set('mattermost_failure_text', 'Deploy to **{{where}}** failed {{mattermost_failure_emoji}}');
4848
```
4949
5050
- `mattermost_success_emoji` – emoji added at the end of success text
@@ -86,9 +86,9 @@
8686
set('mattermost_success_emoji', ':white_check_mark:');
8787
set('mattermost_failure_emoji', ':x:');
8888

89-
set('mattermost_text', '_{{user}}_ deploying `{{branch}}` to **{{target}}**');
90-
set('mattermost_success_text', 'Deploy to **{{target}}** successful {{mattermost_success_emoji}}');
91-
set('mattermost_failure_text', 'Deploy to **{{target}}** failed {{mattermost_failure_emoji}}');
89+
set('mattermost_text', '_{{user}}_ deploying `{{what}}` to **{{where}}**');
90+
set('mattermost_success_text', 'Deploy to **{{where}}** successful {{mattermost_success_emoji}}');
91+
set('mattermost_failure_text', 'Deploy to **{{where}}** failed {{mattermost_failure_emoji}}');
9292

9393
desc('Notifies mattermost');
9494
task('mattermost:notify', function () {

contrib/ms-teams.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@
3535
- `teams_title` – the title of application, default `{{application}}`
3636
- `teams_text` – notification message template, markdown supported
3737
```
38-
set('teams_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
38+
set('teams_text', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
3939
```
4040
- `teams_success_text` – success template, default:
4141
```
42-
set('teams_success_text', 'Deploy to *{{target}}* successful');
42+
set('teams_success_text', 'Deploy to *{{where}}* successful');
4343
```
4444
- `teams_failure_text` – failure template, default:
4545
```
46-
set('teams_failure_text', 'Deploy to *{{target}}* failed');
46+
set('teams_failure_text', 'Deploy to *{{where}}* failed');
4747
```
4848
4949
- `teams_color` – color's attachment
@@ -81,9 +81,9 @@
8181
});
8282

8383
// Deploy message
84-
set('teams_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
85-
set('teams_success_text', 'Deploy to *{{target}}* successful');
86-
set('teams_failure_text', 'Deploy to *{{target}}* failed');
84+
set('teams_text', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
85+
set('teams_success_text', 'Deploy to *{{where}}* successful');
86+
set('teams_failure_text', 'Deploy to *{{where}}* failed');
8787

8888
// Color of attachment
8989
set('teams_color', '#4d91f7');

contrib/ntfy.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
- `ntfy_title` – the title of the message, default `{{application}}`
3333
- `ntfy_text` – notification message template
3434
```
35-
set('ntfy_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
35+
set('ntfy_text', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
3636
```
3737
- `ntfy_tags` – notification message tags / emojis (comma separated)
3838
```
@@ -44,7 +44,7 @@
4444
```
4545
- `ntfy_success_text` – success template, default:
4646
```
47-
set('ntfy_success_text', 'Deploy to *{{target}}* successful');
47+
set('ntfy_success_text', 'Deploy to *{{where}}* successful');
4848
```
4949
- `ntfy_success_tags` – success tags / emojis (comma separated)
5050
```
@@ -53,7 +53,7 @@
5353
- `ntfy_success_priority` – success notification message priority
5454
- `ntfy_failure_text` – failure template, default:
5555
```
56-
set('ntfy_failure_text', 'Deploy to *{{target}}* failed');
56+
set('ntfy_failure_text', 'Deploy to *{{where}}* failed');
5757
```
5858
- `ntfy_failure_tags` – failure tags / emojis (comma separated)
5959
```
@@ -95,9 +95,9 @@
9595
});
9696

9797
// Deploy message
98-
set('ntfy_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
99-
set('ntfy_success_text', 'Deploy to *{{target}}* successful');
100-
set('ntfy_failure_text', 'Deploy to *{{target}}* failed');
98+
set('ntfy_text', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
99+
set('ntfy_success_text', 'Deploy to *{{where}}* successful');
100+
set('ntfy_failure_text', 'Deploy to *{{where}}* failed');
101101

102102
// Message tags
103103
set('ntfy_tags', '');

contrib/rocketchat.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
- `rocketchat_title` - the title of the application, defaults to `{{application}}`
2121
- `rocketchat_text` - notification message
2222
```
23-
set('rocketchat_text', '_{{user}}_ deploying {{branch}} to {{target}}');
23+
set('rocketchat_text', '_{{user}}_ deploying {{what}} to {{where}}');
2424
```
2525
2626
- `rocketchat_success_text` – success template, default:
2727
```
28-
set('rocketchat_success_text', 'Deploy to *{{target}}* successful');
28+
set('rocketchat_success_text', 'Deploy to *{{where}}* successful');
2929
```
3030
- `rocketchat_failure_text` – failure template, default:
3131
```
32-
set('rocketchat_failure_text', 'Deploy to *{{target}}* failed');
32+
set('rocketchat_failure_text', 'Deploy to *{{where}}* failed');
3333
```
3434
3535
- `rocketchat_color` – color's attachment
@@ -78,9 +78,9 @@
7878
set('rocketchat_success_color', '#00c100');
7979
set('rocketchat_failure_color', '#ff0909');
8080

81-
set('rocketchat_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
82-
set('rocketchat_success_text', 'Deploy to *{{target}}* successful');
83-
set('rocketchat_failure_text', 'Deploy to *{{target}}* failed');
81+
set('rocketchat_text', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
82+
set('rocketchat_success_text', 'Deploy to *{{where}}* successful');
83+
set('rocketchat_failure_text', 'Deploy to *{{where}}* failed');
8484

8585
desc('Notifies RocketChat');
8686
task('rocketchat:notify', function () {

contrib/rollbar.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- `rollbar_token` – access token to rollbar api
77
- `rollbar_comment` – comment about deploy, default to
88
```php
9-
set('rollbar_comment', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
9+
set('rollbar_comment', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
1010
```
1111
- `rollbar_username` – rollbar user name
1212
@@ -24,7 +24,7 @@
2424

2525
use Deployer\Utility\Httpie;
2626

27-
set('rollbar_comment', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
27+
set('rollbar_comment', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
2828

2929
desc('Notifies Rollbar of deployment');
3030
task('rollbar:notify', function () {
@@ -34,7 +34,7 @@
3434

3535
$params = [
3636
'access_token' => get('rollbar_token'),
37-
'environment' => get('target'),
37+
'environment' => get('where'),
3838
'revision' => runLocally('git log -n 1 --format="%h"'),
3939
'local_username' => get('user'),
4040
'rollbar_username' => get('rollbar_username'),

contrib/slack.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
- `slack_title` – the title of application, default `{{application}}`
2222
- `slack_text` – notification message template, markdown supported
2323
```
24-
set('slack_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
24+
set('slack_text', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
2525
```
2626
- `slack_success_text` – success template, default:
2727
```
28-
set('slack_success_text', 'Deploy to *{{target}}* successful');
28+
set('slack_success_text', 'Deploy to *{{where}}* successful');
2929
```
3030
- `slack_failure_text` – failure template, default:
3131
```
32-
set('slack_failure_text', 'Deploy to *{{target}}* failed');
32+
set('slack_failure_text', 'Deploy to *{{where}}* failed');
3333
```
3434
3535
- `slack_color` – color's attachment
@@ -75,10 +75,10 @@
7575
});
7676

7777
// Deploy message
78-
set('slack_text', '_{{user}}_ deploying `{{target}}` to *{{hostname}}*');
79-
set('slack_success_text', 'Deploy to *{{target}}* successful');
80-
set('slack_failure_text', 'Deploy to *{{target}}* failed');
81-
set('slack_rollback_text', '_{{user}}_ rolled back changes on *{{target}}*');
78+
set('slack_text', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
79+
set('slack_success_text', 'Deploy to *{{where}}* successful');
80+
set('slack_failure_text', 'Deploy to *{{where}}* failed');
81+
set('slack_rollback_text', '_{{user}}_ rolled back changes on *{{where}}*');
8282
set('slack_fields', []);
8383

8484
// Color of attachment

contrib/telegram.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
- `telegram_title` – the title of application, default `{{application}}`
2525
- `telegram_text` – notification message template
2626
```
27-
_{{user}}_ deploying `{{branch}}` to *{{target}}*
27+
_{{user}}_ deploying `{{what}}` to *{{where}}*
2828
```
2929
- `telegram_success_text` – success template, default:
3030
```
31-
Deploy to *{{target}}* successful
31+
Deploy to *{{where}}* successful
3232
3333
```
3434
- `telegram_failure_text` – failure template, default:
3535
```
36-
Deploy to *{{target}}* failed
36+
Deploy to *{{where}}* failed
3737
```
3838
3939
## Usage
@@ -78,9 +78,9 @@
7878
});
7979

8080
// Deploy message
81-
set('telegram_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
82-
set('telegram_success_text', 'Deploy to *{{target}}* successful');
83-
set('telegram_failure_text', 'Deploy to *{{target}}* failed');
81+
set('telegram_text', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
82+
set('telegram_success_text', 'Deploy to *{{where}}* successful');
83+
set('telegram_failure_text', 'Deploy to *{{where}}* failed');
8484

8585

8686
desc('Notifies Telegram');

contrib/workplace.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
2626
- `workplace_text` - notification message
2727
```
28-
set('workplace_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
28+
set('workplace_text', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
2929
```
3030
3131
- `workplace_success_text` – success template, default:
3232
```
33-
set('workplace_success_text', 'Deploy to *{{target}}* successful');
33+
set('workplace_success_text', 'Deploy to *{{where}}* successful');
3434
```
3535
- `workplace_failure_text` – failure template, default:
3636
```
37-
set('workplace_failure_text', 'Deploy to *{{target}}* failed');
37+
set('workplace_failure_text', 'Deploy to *{{where}}* failed');
3838
```
3939
- `workplace_edit_post` – whether to create a new post for deploy result, or edit the first one created, default creates a new post:
4040
```
@@ -68,9 +68,9 @@
6868
use Deployer\Utility\Httpie;
6969

7070
// Deploy message
71-
set('workplace_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
72-
set('workplace_success_text', 'Deploy to *{{target}}* successful');
73-
set('workplace_failure_text', 'Deploy to *{{target}}* failed');
71+
set('workplace_text', '_{{user}}_ deploying `{{what}}` to *{{where}}*');
72+
set('workplace_success_text', 'Deploy to *{{where}}* successful');
73+
set('workplace_failure_text', 'Deploy to *{{where}}* failed');
7474

7575
// By default, create a new post for every message
7676
set('workplace_edit_post', false);

0 commit comments

Comments
 (0)