rat_deployer 0.1.9 → 0.1.10
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 +6 -1
- data/lib/rat_deployer/notifier.rb +22 -0
- data/lib/rat_deployer/version.rb +1 -1
- metadata +16 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19683d62cba337d7a36e0d19ba5500c8a78eebb5
|
4
|
+
data.tar.gz: c1a9186d1108d5377d02e882dca1482725e319d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 034cdad0bb5d9c1c4585cf62f8523d237dc780d6d6313d4dafa09bbc9ef5b6780c034bd937149abeb82bb03df74eca687b9453c911b4b458d5b2748f6cd6d750
|
7
|
+
data.tar.gz: a3d8eba9c96ffe4a63814bef407576fe60e1a56c81edbd8b4bbdcf3d0c294e38e26d7e8be68b1892d5a0063abda4ca2f13d70f8421cbaa5f4c18699e776d9d5e
|
data/lib/rat_deployer/cli.rb
CHANGED
@@ -2,6 +2,7 @@ require 'thor'
|
|
2
2
|
|
3
3
|
require 'rat_deployer/cli/images'
|
4
4
|
require 'rat_deployer/command'
|
5
|
+
require 'rat_deployer/notifier'
|
5
6
|
|
6
7
|
module RatDeployer
|
7
8
|
class Cli < Thor
|
@@ -12,14 +13,18 @@ module RatDeployer
|
|
12
13
|
|
13
14
|
desc "deploy", "deploys current environment"
|
14
15
|
def deploy
|
16
|
+
RatDeployer::Notifier.notify "Starting deploy on #{ENV.fetch('RAT_ENV')}"
|
17
|
+
|
15
18
|
RatDeployer::Cli::Images.new.update
|
16
19
|
RatDeployer::Cli.new.compose('pull')
|
17
20
|
RatDeployer::Cli.new.compose('up -d')
|
21
|
+
|
22
|
+
RatDeployer::Notifier.notify "Ended deploy on #{ENV.fetch('RAT_ENV')}"
|
18
23
|
end
|
19
24
|
|
20
25
|
desc "compose ARGS...", "runs docker-compose command with default flags"
|
21
26
|
def compose(cmd, *cmd_flags)
|
22
|
-
|
27
|
+
env = RatDeployer::Config.env
|
23
28
|
project_name = RatDeployer::Config.all.fetch('project_name')
|
24
29
|
|
25
30
|
flags = [
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'slack-notifier'
|
2
|
+
|
3
|
+
module RatDeployer
|
4
|
+
module Notifier
|
5
|
+
def self.notify(msg)
|
6
|
+
self.slack_notifier.ping msg
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.slack_notifier
|
10
|
+
@slack_notifier ||=
|
11
|
+
begin
|
12
|
+
webhook_url = RatDeployer::Config.all.fetch("slack_webhook_url")
|
13
|
+
|
14
|
+
Slack::Notifier.new(
|
15
|
+
webhook_url,
|
16
|
+
channel: '#general',
|
17
|
+
username: 'rat-deployer'
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/rat_deployer/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rat_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Oga
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.7.8
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: slack-notifier
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: bundler
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,6 +122,7 @@ files:
|
|
108
122
|
- lib/rat_deployer/cli/images.rb
|
109
123
|
- lib/rat_deployer/command.rb
|
110
124
|
- lib/rat_deployer/config.rb
|
125
|
+
- lib/rat_deployer/notifier.rb
|
111
126
|
- lib/rat_deployer/version.rb
|
112
127
|
- vendor/rat.txt
|
113
128
|
homepage: http://github.com/nicooga/rat_deployer
|