vidar 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dependabot/config.yml +18 -0
- data/.travis.yml +1 -1
- data/Gemfile.lock +12 -12
- data/lib/vidar/cli.rb +2 -0
- data/lib/vidar/config.rb +5 -0
- data/lib/vidar/slack_notification.rb +10 -4
- data/lib/vidar/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 965a91b756cc7f653ce73b1e178629df468805ddf402471a8ad5fc900cd9047c
|
4
|
+
data.tar.gz: a696f2e3f931eea7a88a24139a9cba019c4754bc0a8a362c9fa1a58820beae0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 691608831009084e56395db3dde528504ab9c81f7f431fcfbe5b3a0f0be6a2c7ebfaf3e9d589cf7849fa6543082d0d7df9e8629c3d11b1469b65f27e5d9fc0be
|
7
|
+
data.tar.gz: f7694a9183fb89621187bf5033e90214a4e41a97ed7001bec60f3ccdd5eb9ae5d06e151ced35d8e3efd6bcd932619f9349c7cb67c712640311a3d2f4ce38517a
|
@@ -0,0 +1,18 @@
|
|
1
|
+
version: 1
|
2
|
+
|
3
|
+
update_configs:
|
4
|
+
- package_manager: "ruby:bundler"
|
5
|
+
directory: "/"
|
6
|
+
update_schedule: "monthly"
|
7
|
+
commit_message:
|
8
|
+
prefix: "[dependabot]"
|
9
|
+
allowed_updates:
|
10
|
+
- match:
|
11
|
+
update_type: "all"
|
12
|
+
automerged_updates:
|
13
|
+
- match:
|
14
|
+
dependency_type: "development"
|
15
|
+
update_type: "all"
|
16
|
+
- match:
|
17
|
+
dependency_type: "production"
|
18
|
+
update_type: "all"
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
vidar (1.
|
4
|
+
vidar (1.1.0)
|
5
5
|
colorize
|
6
6
|
faraday
|
7
7
|
thor (~> 1.0)
|
@@ -14,13 +14,13 @@ GEM
|
|
14
14
|
coderay (1.1.2)
|
15
15
|
colorize (0.8.1)
|
16
16
|
diff-lcs (1.3)
|
17
|
-
faraday (0.
|
17
|
+
faraday (1.0.0)
|
18
18
|
multipart-post (>= 1.2, < 3)
|
19
19
|
jaro_winkler (1.5.4)
|
20
20
|
method_source (0.9.2)
|
21
21
|
multipart-post (2.1.1)
|
22
22
|
parallel (1.19.1)
|
23
|
-
parser (2.
|
23
|
+
parser (2.7.0.2)
|
24
24
|
ast (~> 2.4.0)
|
25
25
|
pry (0.12.2)
|
26
26
|
coderay (~> 1.1.0)
|
@@ -31,27 +31,27 @@ GEM
|
|
31
31
|
rspec-core (~> 3.9.0)
|
32
32
|
rspec-expectations (~> 3.9.0)
|
33
33
|
rspec-mocks (~> 3.9.0)
|
34
|
-
rspec-core (3.9.
|
35
|
-
rspec-support (~> 3.9.
|
34
|
+
rspec-core (3.9.1)
|
35
|
+
rspec-support (~> 3.9.1)
|
36
36
|
rspec-expectations (3.9.0)
|
37
37
|
diff-lcs (>= 1.2.0, < 2.0)
|
38
38
|
rspec-support (~> 3.9.0)
|
39
|
-
rspec-mocks (3.9.
|
39
|
+
rspec-mocks (3.9.1)
|
40
40
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
41
|
rspec-support (~> 3.9.0)
|
42
|
-
rspec-support (3.9.
|
43
|
-
rubocop (0.
|
42
|
+
rspec-support (3.9.2)
|
43
|
+
rubocop (0.79.0)
|
44
44
|
jaro_winkler (~> 1.5.1)
|
45
45
|
parallel (~> 1.10)
|
46
|
-
parser (>= 2.
|
46
|
+
parser (>= 2.7.0.1)
|
47
47
|
rainbow (>= 2.2.2, < 4.0)
|
48
48
|
ruby-progressbar (~> 1.7)
|
49
49
|
unicode-display_width (>= 1.4.0, < 1.7)
|
50
|
-
rubocop-performance (1.5.
|
50
|
+
rubocop-performance (1.5.2)
|
51
51
|
rubocop (>= 0.71.0)
|
52
52
|
ruby-progressbar (1.10.1)
|
53
53
|
thor (1.0.1)
|
54
|
-
unicode-display_width (1.6.
|
54
|
+
unicode-display_width (1.6.1)
|
55
55
|
|
56
56
|
PLATFORMS
|
57
57
|
ruby
|
@@ -67,4 +67,4 @@ DEPENDENCIES
|
|
67
67
|
vidar!
|
68
68
|
|
69
69
|
BUNDLED WITH
|
70
|
-
2.
|
70
|
+
2.1.4
|
data/lib/vidar/cli.rb
CHANGED
@@ -117,6 +117,7 @@ module Vidar
|
|
117
117
|
github: Config.get!(:github),
|
118
118
|
revision: Config.get!(:revision),
|
119
119
|
revision_name: Config.get!(:revision_name),
|
120
|
+
build_url: Config.build_url,
|
120
121
|
deploy_config: Config.deploy_config
|
121
122
|
)
|
122
123
|
|
@@ -194,6 +195,7 @@ module Vidar
|
|
194
195
|
github: Config.get!(:github),
|
195
196
|
revision: Config.get!(:revision),
|
196
197
|
revision_name: Config.get!(:revision_name),
|
198
|
+
build_url: Config.build_url,
|
197
199
|
deploy_config: Config.deploy_config
|
198
200
|
)
|
199
201
|
|
data/lib/vidar/config.rb
CHANGED
@@ -52,6 +52,11 @@ module Vidar
|
|
52
52
|
get(key) || fail(MissingConfigError, key)
|
53
53
|
end
|
54
54
|
|
55
|
+
def build_url
|
56
|
+
value = ENV[get(:build_env).to_s]
|
57
|
+
value&.empty? ? nil : value
|
58
|
+
end
|
59
|
+
|
55
60
|
def deploy_config
|
56
61
|
deployments = get(:deployments)
|
57
62
|
deployments = {} unless deployments.is_a?(Hash)
|
@@ -1,9 +1,11 @@
|
|
1
1
|
module Vidar
|
2
2
|
class SlackNotification
|
3
|
-
def initialize(github:, revision:, revision_name:, deploy_config:)
|
3
|
+
def initialize(github:, revision:, revision_name:, deploy_config:, build_url: nil)
|
4
4
|
@github = github
|
5
5
|
@revision = revision
|
6
6
|
@revision_name = revision_name
|
7
|
+
@build_url = build_url
|
8
|
+
@build_hostname = URI(build_url || '').hostname
|
7
9
|
@deploy_name = deploy_config.name
|
8
10
|
@deploy_url = deploy_config.url
|
9
11
|
@default_color = deploy_config.default_color
|
@@ -18,12 +20,12 @@ module Vidar
|
|
18
20
|
end
|
19
21
|
|
20
22
|
def failure
|
21
|
-
message = "Failed deploy of #{github_link} to #{deploy_link} :fire: <!channel>"
|
23
|
+
message = "Failed deploy of #{github_link} to #{deploy_link} :fire: <!channel> #{build_link}"
|
22
24
|
perform_with data(message: message, color: failure_color)
|
23
25
|
end
|
24
26
|
|
25
27
|
def success
|
26
|
-
message = "Successful deploy of #{github_link} to #{deploy_link}"
|
28
|
+
message = "Successful deploy of #{github_link} to #{deploy_link}. #{build_link}"
|
27
29
|
perform_with data(message: message, color: success_color)
|
28
30
|
end
|
29
31
|
|
@@ -44,7 +46,7 @@ module Vidar
|
|
44
46
|
attr_reader :github, :revision, :revision_name,
|
45
47
|
:deploy_name, :deploy_url, :webhook_url,
|
46
48
|
:default_color, :success_color, :failure_color,
|
47
|
-
:connection
|
49
|
+
:connection, :build_url, :build_hostname
|
48
50
|
|
49
51
|
def data(message:, color:)
|
50
52
|
{
|
@@ -71,5 +73,9 @@ module Vidar
|
|
71
73
|
def deploy_link
|
72
74
|
"<#{deploy_url}|#{deploy_name}>"
|
73
75
|
end
|
76
|
+
|
77
|
+
def build_link
|
78
|
+
build_url && "<#{build_url}|View the build on #{build_hostname}>"
|
79
|
+
end
|
74
80
|
end
|
75
81
|
end
|
data/lib/vidar/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Knapik
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|
@@ -160,6 +160,7 @@ executables:
|
|
160
160
|
extensions: []
|
161
161
|
extra_rdoc_files: []
|
162
162
|
files:
|
163
|
+
- ".dependabot/config.yml"
|
163
164
|
- ".gitignore"
|
164
165
|
- ".rspec"
|
165
166
|
- ".travis.yml"
|