rat_deployer 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rat_deployer/cli.rb +1 -1
- data/lib/rat_deployer/notifier.rb +6 -0
- data/lib/rat_deployer/version.rb +1 -1
- 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: 74983b96f796cdeb6f4cd9f2e8772175c8a12585
|
4
|
+
data.tar.gz: 7cf240bdd56de28e636f6169aae2c750c77c2c6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a027dacb0771134117aba68c8feded26a3985fe461e54e6c7f388eee990d63279a07fe29b2b947e14f249de3fb4cca63aadaee2c8691121aee9f01420c88b898
|
7
|
+
data.tar.gz: 45c19071b97022807ed5bb0d1934ccc92920589c3c8e726ee9fd21b3772fb69166fc50d2ba2aead08b139998b1f5c7ec30e90336540ef2dbb0c2bcad50761f53
|
data/lib/rat_deployer/cli.rb
CHANGED
@@ -11,7 +11,6 @@ module RatDeployer
|
|
11
11
|
def deploy(*services)
|
12
12
|
RatDeployer::Notifier.notify_deploy_start
|
13
13
|
|
14
|
-
|
15
14
|
if services.any?
|
16
15
|
services_str = services.join(' ')
|
17
16
|
RatDeployer::Cli.new.compose("pull #{services_str}")
|
@@ -28,6 +27,7 @@ Failed deploy on #{ENV.fetch('RAT_ENV')}"
|
|
28
27
|
Reason:
|
29
28
|
#{e.message}
|
30
29
|
STR
|
30
|
+
raise e
|
31
31
|
end
|
32
32
|
|
33
33
|
desc "compose ARGS...", "runs docker-compose command with default flags"
|
@@ -5,14 +5,17 @@ require 'slack-notifier'
|
|
5
5
|
module RatDeployer
|
6
6
|
module Notifier
|
7
7
|
def self.notify_deploy_start
|
8
|
+
return unless webhook_url
|
8
9
|
notify_deploy "Starting deploy on #{ENV.fetch('RAT_ENV')}"
|
9
10
|
end
|
10
11
|
|
11
12
|
def self.notify_deploy_end
|
13
|
+
return unless webhook_url
|
12
14
|
notify_deploy "Ended deploy on #{ENV.fetch('RAT_ENV')}"
|
13
15
|
end
|
14
16
|
|
15
17
|
def self.notify_deploy(title)
|
18
|
+
return unless webhook_url
|
16
19
|
props = get_deploy_properties
|
17
20
|
|
18
21
|
slack_notifier.post(
|
@@ -31,6 +34,7 @@ module RatDeployer
|
|
31
34
|
end
|
32
35
|
|
33
36
|
def self.notify(msg)
|
37
|
+
return unless webhook_url
|
34
38
|
return unless webhook_url
|
35
39
|
self.slack_notifier.ping msg
|
36
40
|
end
|
@@ -38,6 +42,8 @@ module RatDeployer
|
|
38
42
|
private
|
39
43
|
|
40
44
|
def self.slack_notifier
|
45
|
+
return unless webhook_url
|
46
|
+
|
41
47
|
@slack_notifier ||=
|
42
48
|
begin
|
43
49
|
Slack::Notifier.new(
|
data/lib/rat_deployer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rat_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Oga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|