kapost_deploy 0.2.0 → 0.3.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/lib/kapost_deploy/heroku/app_promoter.rb +1 -0
- data/lib/kapost_deploy/heroku/app_releases.rb +1 -0
- data/lib/kapost_deploy/heroku/shell.rb +1 -0
- data/lib/kapost_deploy/identity.rb +2 -1
- data/lib/kapost_deploy/plugins/db_migrate.rb +1 -0
- data/lib/kapost_deploy/plugins/notify_honeybadger_after_promote.rb +63 -0
- data/lib/kapost_deploy/plugins/slack_after_promote.rb +1 -0
- data/lib/kapost_deploy/plugins/slack_github_diff.rb +1 -0
- data/lib/kapost_deploy/slack/notifier.rb +1 -0
- data/lib/kapost_deploy/task.rb +1 -0
- data/lib/kapost_deploy.rb +1 -0
- metadata +23 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f636f108d8ab041901116f42b1b841c2953a17d5
|
4
|
+
data.tar.gz: 5548e18ea305b516b29f6447405d6c5ca39a7dc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e35c839413ff6d4d7319e90057b51998c96adc3a26c0e53e83aeaf3c9c063bfb609f9ce678c7ea55853cb8b37ed090ed995722bdca52024be94b877135944980
|
7
|
+
data.tar.gz: e79b318d91dbca573c2153a98b58aeca893626a3c254c586ee1ca510d5f00ee6825f906e8f075f4f04ad718dfcfecc6725b17e59dfd8bea91a9748575a24163b
|
data/README.md
CHANGED
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "kapost_deploy/heroku/app_releases"
|
4
|
+
|
5
|
+
module KapostDeploy
|
6
|
+
module Plugins
|
7
|
+
# After-promotion plugin to notify honeybadger after a promotion is complete.
|
8
|
+
# Honeybadger.io can be configured to clear all honeybadgers upon this deploy notification.
|
9
|
+
class NotifyHoneyBadgerAfterPromote
|
10
|
+
def initialize(config,
|
11
|
+
ahead_releases: KapostDeploy::Heroku::AppReleases.new(config.app, token: config.heroku_api_token),
|
12
|
+
kernel: Kernel)
|
13
|
+
|
14
|
+
self.config = config
|
15
|
+
self.git_config = config.options.fetch(:git_config, {})
|
16
|
+
self.ahead_releases = ahead_releases
|
17
|
+
self.kernel = kernel
|
18
|
+
end
|
19
|
+
|
20
|
+
def after
|
21
|
+
return unless configured?
|
22
|
+
|
23
|
+
notify_honeybadger
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
attr_accessor :config, :git_config, :ahead_releases, :kernel
|
29
|
+
|
30
|
+
def notify_honeybadger
|
31
|
+
kernel.system("bundle exec honeybadger deploy -e #{env} -s #{commit_sha} -r #{repository_url}")
|
32
|
+
end
|
33
|
+
|
34
|
+
def env
|
35
|
+
config.to.split("-").last
|
36
|
+
end
|
37
|
+
|
38
|
+
def commit_sha
|
39
|
+
ci_sha || pipeline_sha
|
40
|
+
end
|
41
|
+
|
42
|
+
def ci_sha
|
43
|
+
ENV["CIRCLE_SHA1"]
|
44
|
+
end
|
45
|
+
|
46
|
+
def pipeline_sha
|
47
|
+
ahead_releases.latest_deploy_version
|
48
|
+
end
|
49
|
+
|
50
|
+
def github_repo
|
51
|
+
git_config[:github_repo] unless git_config.nil?
|
52
|
+
end
|
53
|
+
|
54
|
+
def repository_url
|
55
|
+
"https://github.com/#{github_repo}"
|
56
|
+
end
|
57
|
+
|
58
|
+
def configured?
|
59
|
+
!github_repo.nil? && !github_repo.empty?
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
data/lib/kapost_deploy/task.rb
CHANGED
data/lib/kapost_deploy.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kapost_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Croft
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -53,63 +53,49 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.4.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: honeybadger
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
62
|
-
type: :
|
61
|
+
version: '2.0'
|
62
|
+
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pry
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
68
|
+
version: '2.0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
70
|
+
name: bundler
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
|
-
- - "
|
73
|
+
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
75
|
+
version: '1.11'
|
90
76
|
type: :development
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
|
-
- - "
|
80
|
+
- - "~>"
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
82
|
+
version: '1.11'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
84
|
+
name: gemsmith
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
|
-
- - "
|
87
|
+
- - "~>"
|
102
88
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
89
|
+
version: '7.7'
|
104
90
|
type: :development
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
108
|
-
- - "
|
94
|
+
- - "~>"
|
109
95
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
96
|
+
version: '7.7'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
|
-
name: pry
|
98
|
+
name: pry
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
101
|
- - ">="
|
@@ -123,7 +109,7 @@ dependencies:
|
|
123
109
|
- !ruby/object:Gem::Version
|
124
110
|
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: pry-
|
112
|
+
name: pry-byebug
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
115
|
- - ">="
|
@@ -137,7 +123,7 @@ dependencies:
|
|
137
123
|
- !ruby/object:Gem::Version
|
138
124
|
version: '0'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
|
-
name: pry-
|
126
|
+
name: pry-state
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
142
128
|
requirements:
|
143
129
|
- - ">="
|
@@ -226,14 +212,14 @@ dependencies:
|
|
226
212
|
requirements:
|
227
213
|
- - "~>"
|
228
214
|
- !ruby/object:Gem::Version
|
229
|
-
version: '0.
|
215
|
+
version: '0.40'
|
230
216
|
type: :development
|
231
217
|
prerelease: false
|
232
218
|
version_requirements: !ruby/object:Gem::Requirement
|
233
219
|
requirements:
|
234
220
|
- - "~>"
|
235
221
|
- !ruby/object:Gem::Version
|
236
|
-
version: '0.
|
222
|
+
version: '0.40'
|
237
223
|
- !ruby/object:Gem::Dependency
|
238
224
|
name: codeclimate-test-reporter
|
239
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -249,7 +235,7 @@ dependencies:
|
|
249
235
|
- !ruby/object:Gem::Version
|
250
236
|
version: '0'
|
251
237
|
- !ruby/object:Gem::Dependency
|
252
|
-
name:
|
238
|
+
name: climate_control
|
253
239
|
requirement: !ruby/object:Gem::Requirement
|
254
240
|
requirements:
|
255
241
|
- - ">="
|
@@ -277,6 +263,7 @@ files:
|
|
277
263
|
- lib/kapost_deploy/heroku/shell.rb
|
278
264
|
- lib/kapost_deploy/identity.rb
|
279
265
|
- lib/kapost_deploy/plugins/db_migrate.rb
|
266
|
+
- lib/kapost_deploy/plugins/notify_honeybadger_after_promote.rb
|
280
267
|
- lib/kapost_deploy/plugins/slack_after_promote.rb
|
281
268
|
- lib/kapost_deploy/plugins/slack_github_diff.rb
|
282
269
|
- lib/kapost_deploy/slack/notifier.rb
|