capistrano-slackify 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/capistrano-slackify.gemspec +1 -1
- data/lib/capistrano/tasks/slackify.cap +22 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a65401952b4c0d8b00caee9fed5a52c3d2fdca0
|
4
|
+
data.tar.gz: d324e8869b5321748ca83cb7e65b651568dfdfc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4916f2bb9da2ebe8ada3c511176106b94c4956fd5bcbd0af881d89f74b68ab4082fadbb29183669a0fbb0ad66c16c48cdfc99fd19fd102b37546eff368d662a3
|
7
|
+
data.tar.gz: 40a25dc484860c3adbd12951cdc3b3700f27540dcba94e83fd027ea57accf35e0ad01431b25956384c914c9feaaf88e32c3458a2ba83aacf42282b982871c195
|
data/README.md
CHANGED
@@ -71,6 +71,7 @@ Any of the defaults can be over-ridden in `config/deploy.rb`:
|
|
71
71
|
}
|
72
72
|
set :slack_deploy_finished_color, 'good'
|
73
73
|
set :slack_deploy_failed_color, 'danger'
|
74
|
+
set :slack_notify_events, [:started, :finished, :failed]
|
74
75
|
|
75
76
|
To configure the way slack parses your message (see 'Parsing Modes' at https://api.slack.com/docs/formatting) use the `:slack_parse` setting:
|
76
77
|
|
data/capistrano-slackify.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'capistrano-slackify'
|
7
|
-
spec.version = '2.
|
7
|
+
spec.version = '2.5.0'
|
8
8
|
spec.authors = ['seenmyfate']
|
9
9
|
spec.email = ['seenmyfate@gmail.com']
|
10
10
|
spec.summary = %q{Publish deployment notifications to Slack via the incoming webhooks integration}
|
@@ -3,12 +3,15 @@ namespace :slack do
|
|
3
3
|
':slack_subdomain and :slack_token must be set'
|
4
4
|
task :notify_started do
|
5
5
|
run_locally do
|
6
|
-
info 'Notifying Slack of deploy starting'
|
7
6
|
set :time_started, Time.now.to_i
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
if fetch(:slack_notify_events).include? :started
|
9
|
+
info 'Notifying Slack of deploy starting'
|
10
|
+
|
11
|
+
execute :curl, '-X POST', '--data-urlencode',
|
12
|
+
Slackify::Payload.build(self, :starting),
|
13
|
+
fetch(:slack_url)
|
14
|
+
end
|
12
15
|
end
|
13
16
|
end
|
14
17
|
before 'deploy:starting', 'slack:notify_started'
|
@@ -17,12 +20,15 @@ namespace :slack do
|
|
17
20
|
':slack_subdomain and :slack_token must be set'
|
18
21
|
task :notify_finished do
|
19
22
|
run_locally do
|
20
|
-
info 'Notifying Slack of deploy finished'
|
21
23
|
set :time_finished, Time.now.to_i
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
25
|
+
if fetch(:slack_notify_events).include? :finished
|
26
|
+
info 'Notifying Slack of deploy finished'
|
27
|
+
|
28
|
+
execute :curl, '-X POST', '--data-urlencode',
|
29
|
+
Slackify::Payload.build(self, :success),
|
30
|
+
fetch(:slack_url)
|
31
|
+
end
|
26
32
|
end
|
27
33
|
end
|
28
34
|
after 'deploy:finished', 'slack:notify_finished'
|
@@ -31,12 +37,15 @@ namespace :slack do
|
|
31
37
|
'integration - :slack_subdomain and :slack_token must be set'
|
32
38
|
task :notify_failed do
|
33
39
|
run_locally do
|
34
|
-
info 'Notifying Slack of deploy failed'
|
35
40
|
set :time_finished, Time.now.to_i
|
36
41
|
|
37
|
-
|
38
|
-
|
39
|
-
|
42
|
+
if fetch(:slack_notify_events).include? :failed
|
43
|
+
info 'Notifying Slack of deploy failed'
|
44
|
+
|
45
|
+
execute :curl, '-X POST', '--data-urlencode',
|
46
|
+
Slackify::Payload.build(self, :failed),
|
47
|
+
fetch(:slack_url)
|
48
|
+
end
|
40
49
|
end
|
41
50
|
end
|
42
51
|
after 'deploy:failed', 'slack:notify_failed'
|
@@ -66,5 +75,6 @@ namespace :load do
|
|
66
75
|
set :slack_deploy_starting_color, 'warning'
|
67
76
|
set :slack_deploy_finished_color, 'good'
|
68
77
|
set :slack_deploy_failed_color, 'danger'
|
78
|
+
set :slack_notify_events, [:started, :finished, :failed]
|
69
79
|
end
|
70
80
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-slackify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- seenmyfate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|