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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 630b6475a7c98e1e5c898a5500c4972438ea8a84
4
- data.tar.gz: c2bff1fc9498d5d5ba2eb1ff61d5e8aa461ff5dd
3
+ metadata.gz: 74983b96f796cdeb6f4cd9f2e8772175c8a12585
4
+ data.tar.gz: 7cf240bdd56de28e636f6169aae2c750c77c2c6b
5
5
  SHA512:
6
- metadata.gz: f6220c3ce5071ed1d61a9be2bd7750734e50fc04456d75a50ec184adaa5b60e8f3648a3f7b9377ee4550dd4da24c91c8b510e54bcf792f3b33d8de9d9ea2df02
7
- data.tar.gz: 707b1af429e80edf9577c9463fb418a3888612bd9e9fede5f09413c0a6452021b534d95c6ae3d6644c26d424f5673508c55210a802b70f4261208740d5c243bc
6
+ metadata.gz: a027dacb0771134117aba68c8feded26a3985fe461e54e6c7f388eee990d63279a07fe29b2b947e14f249de3fb4cca63aadaee2c8691121aee9f01420c88b898
7
+ data.tar.gz: 45c19071b97022807ed5bb0d1934ccc92920589c3c8e726ee9fd21b3772fb69166fc50d2ba2aead08b139998b1f5c7ec30e90336540ef2dbb0c2bcad50761f53
@@ -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(
@@ -1,3 +1,3 @@
1
1
  module RatDeployer
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
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.0
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-03 00:00:00.000000000 Z
11
+ date: 2017-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor