capistrano-slack_notification 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e72e1677f4f337d523465026ab43fea05f32d22
|
4
|
+
data.tar.gz: 12789f427d1f7aca2918d3cccef2577adb9d7eac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d1afca5522d9ac6cb2f97b7405ab6a645229163861d5aadea83b9124fa759d8b0cbd19ed9301be67f9690be0e358bbf1398ec55f7ecbda533c34907c7d3ef2a
|
7
|
+
data.tar.gz: 2f2abba849a4ac834e3294ff54eb9ac275c202ba436953d6cfc7faba8a440cb2bbed1b7545a12529b28da16a021c297422458f9b3a7d85831a6f7e5305d3ba7d
|
@@ -34,29 +34,36 @@ namespace :slack do
|
|
34
34
|
channel: fetch(:slack_channel),
|
35
35
|
icon_url: fetch(:slack_icon_url),
|
36
36
|
text: '',
|
37
|
-
link_names: 1
|
37
|
+
link_names: 1,
|
38
|
+
mrkdwn: true
|
38
39
|
}
|
39
40
|
}
|
40
41
|
|
41
42
|
set :slack_start_body, -> {
|
43
|
+
text = "Started deploying to #{fetch(:slack_stage)} by @#{fetch(:slack_deployer)}" +
|
44
|
+
" (branch #{fetch(:branch)})",
|
45
|
+
|
42
46
|
fetch(:slack_default_body).merge(
|
43
47
|
attachments: JSON.dump([{
|
44
48
|
color: "warning",
|
45
49
|
title: fetch(:application),
|
46
|
-
text:
|
47
|
-
|
50
|
+
text: text,
|
51
|
+
fallback: text,
|
48
52
|
mrkdwn_in: ['text']
|
49
53
|
}])
|
50
54
|
)
|
51
55
|
}
|
52
56
|
|
53
57
|
set :slack_failure_body, -> {
|
58
|
+
text = "Failed deploying to #{fetch(:slack_stage)} by @#{fetch(:slack_deployer)}" +
|
59
|
+
" (branch #{fetch(:branch)} at #{fetch(:current_revision)} / #{elapsed_time.call} sec)"
|
60
|
+
|
54
61
|
fetch(:slack_default_body).merge(
|
55
62
|
attachments: JSON.dump([{
|
56
63
|
color: 'danger',
|
57
64
|
title: fetch(:application),
|
58
|
-
text:
|
59
|
-
|
65
|
+
text: text,
|
66
|
+
fallback: text,
|
60
67
|
mrkdwn_in: ['text']
|
61
68
|
}])
|
62
69
|
)
|
@@ -64,12 +71,15 @@ namespace :slack do
|
|
64
71
|
|
65
72
|
set :slack_success_body, -> {
|
66
73
|
task = fetch(:deploying) ? 'deployment' : '*rollback*'
|
74
|
+
text = "Successful #{task} to #{fetch(:slack_stage)} by @#{fetch(:slack_deployer)}" +
|
75
|
+
" (branch #{fetch(:branch)} at #{fetch(:current_revision)} / #{elapsed_time.call} sec)"
|
76
|
+
|
67
77
|
fetch(:slack_default_body).merge(
|
68
78
|
attachments: JSON.dump([{
|
69
79
|
color: 'good',
|
70
80
|
title: fetch(:application),
|
71
|
-
text:
|
72
|
-
|
81
|
+
text: text,
|
82
|
+
fallback: text,
|
73
83
|
mrkdwn_in: ['text']
|
74
84
|
}])
|
75
85
|
)
|