vidar 1.5.2 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bundler-version +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +19 -19
- data/lib/vidar/cli.rb +5 -7
- data/lib/vidar/k8s/pod_set.rb +6 -4
- data/lib/vidar/slack_notification.rb +10 -0
- data/lib/vidar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c00bab992d33cc5485394ff4942569a73b4b0a8ae6aba4a64d96db922edfa46e
|
4
|
+
data.tar.gz: bc83c5d33cffae2c695d40e61378b5fb2326a789016a73b80be6df0c10c3177c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3afdc47337321ea2bb3af105de27a5be2bab972e2e81f8c63c47d6deb9c8becbae9e90eba764a905c1262f54e5842269242db011ba5d6c643686627f377ff5c
|
7
|
+
data.tar.gz: d81b57bc6be8eccb2d370424167655ace1a74fff390bdd391d2ff1ce0527623f001c99b66f266b1319fc109de15e092cb4edd93886fde4c0a15757e37a80442d
|
data/.bundler-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.25
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
vidar (1.5.
|
4
|
+
vidar (1.5.4)
|
5
5
|
colorize
|
6
6
|
faraday
|
7
7
|
thor (~> 1.0)
|
@@ -18,10 +18,10 @@ GEM
|
|
18
18
|
crack (0.4.5)
|
19
19
|
rexml
|
20
20
|
diff-lcs (1.5.0)
|
21
|
-
faraday (2.
|
21
|
+
faraday (2.7.1)
|
22
22
|
faraday-net_http (>= 2.0, < 3.1)
|
23
23
|
ruby2_keywords (>= 0.0.4)
|
24
|
-
faraday-net_http (3.0.
|
24
|
+
faraday-net_http (3.0.2)
|
25
25
|
hashdiff (1.0.1)
|
26
26
|
json (2.6.2)
|
27
27
|
method_source (1.0.0)
|
@@ -34,36 +34,36 @@ GEM
|
|
34
34
|
public_suffix (5.0.0)
|
35
35
|
rainbow (3.1.1)
|
36
36
|
rake (13.0.6)
|
37
|
-
regexp_parser (2.
|
37
|
+
regexp_parser (2.6.1)
|
38
38
|
rexml (3.2.5)
|
39
|
-
rspec (3.
|
40
|
-
rspec-core (~> 3.
|
41
|
-
rspec-expectations (~> 3.
|
42
|
-
rspec-mocks (~> 3.
|
43
|
-
rspec-core (3.
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-expectations (3.
|
39
|
+
rspec (3.12.0)
|
40
|
+
rspec-core (~> 3.12.0)
|
41
|
+
rspec-expectations (~> 3.12.0)
|
42
|
+
rspec-mocks (~> 3.12.0)
|
43
|
+
rspec-core (3.12.0)
|
44
|
+
rspec-support (~> 3.12.0)
|
45
|
+
rspec-expectations (3.12.0)
|
46
46
|
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
-
rspec-support (~> 3.
|
48
|
-
rspec-mocks (3.
|
47
|
+
rspec-support (~> 3.12.0)
|
48
|
+
rspec-mocks (3.12.0)
|
49
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
-
rspec-support (~> 3.
|
51
|
-
rspec-support (3.
|
52
|
-
rubocop (1.
|
50
|
+
rspec-support (~> 3.12.0)
|
51
|
+
rspec-support (3.12.0)
|
52
|
+
rubocop (1.39.0)
|
53
53
|
json (~> 2.3)
|
54
54
|
parallel (~> 1.10)
|
55
55
|
parser (>= 3.1.2.1)
|
56
56
|
rainbow (>= 2.2.2, < 4.0)
|
57
57
|
regexp_parser (>= 1.8, < 3.0)
|
58
58
|
rexml (>= 3.2.5, < 4.0)
|
59
|
-
rubocop-ast (>= 1.
|
59
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
60
60
|
ruby-progressbar (~> 1.7)
|
61
61
|
unicode-display_width (>= 1.4.0, < 3.0)
|
62
|
-
rubocop-ast (1.
|
62
|
+
rubocop-ast (1.23.0)
|
63
63
|
parser (>= 3.1.1.0)
|
64
64
|
rubocop-rake (0.6.0)
|
65
65
|
rubocop (~> 1.0)
|
66
|
-
rubocop-rspec (2.
|
66
|
+
rubocop-rspec (2.15.0)
|
67
67
|
rubocop (~> 1.33)
|
68
68
|
ruby-progressbar (1.11.0)
|
69
69
|
ruby2_keywords (0.0.5)
|
data/lib/vidar/cli.rb
CHANGED
@@ -74,6 +74,8 @@ module Vidar
|
|
74
74
|
Log.info "Looking for deploy hook..."
|
75
75
|
template_name, error, status = Open3.capture3 "kubectl get cronjob deploy-hook-template -n #{Config.get!(:namespace)} -o name --ignore-not-found=true"
|
76
76
|
|
77
|
+
slack_notification = SlackNotification.get
|
78
|
+
|
77
79
|
if status.success?
|
78
80
|
if template_name.to_s.empty?
|
79
81
|
Log.info "No deploy hook found"
|
@@ -90,11 +92,13 @@ module Vidar
|
|
90
92
|
unless deploy_status.success?
|
91
93
|
Run.kubectl "describe job deploy-hook"
|
92
94
|
Log.error "Error running deploy hook template"
|
95
|
+
slack_notification.failure if slack_notification.configured?
|
93
96
|
exit(1)
|
94
97
|
end
|
95
98
|
end
|
96
99
|
else
|
97
100
|
Log.info "Error getting deploy hook template: #{error}"
|
101
|
+
slack_notification.failure if slack_notification.configured?
|
98
102
|
exit(1)
|
99
103
|
end
|
100
104
|
|
@@ -116,13 +120,7 @@ module Vidar
|
|
116
120
|
Log.info "Current kubectl context: #{Config.get!(:kubectl_context)}"
|
117
121
|
Log.info "Checking if all containers in #{Config.get!(:namespace)} namespace(s) are ready..."
|
118
122
|
|
119
|
-
slack_notification = SlackNotification.
|
120
|
-
github: Config.get!(:github),
|
121
|
-
revision: Config.get!(:revision),
|
122
|
-
revision_name: Config.get!(:revision_name),
|
123
|
-
build_url: Config.build_url,
|
124
|
-
deploy_config: Config.deploy_config
|
125
|
-
)
|
123
|
+
slack_notification = SlackNotification.get
|
126
124
|
|
127
125
|
deploy_status = Vidar::DeployStatus.new(namespace: Config.get!(:namespace))
|
128
126
|
|
data/lib/vidar/k8s/pod_set.rb
CHANGED
@@ -32,9 +32,11 @@ module Vidar
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def containers
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
if filter
|
36
|
+
all_containers.select { |cs| cs.name.to_s.include?(filter) }
|
37
|
+
else
|
38
|
+
all_containers.reject(&:job?)
|
39
|
+
end
|
38
40
|
end
|
39
41
|
|
40
42
|
private
|
@@ -61,7 +63,7 @@ module Vidar
|
|
61
63
|
end
|
62
64
|
|
63
65
|
def all_containers
|
64
|
-
@all_containers ||= containers_data.map { |status| Container.new(status) }
|
66
|
+
@all_containers ||= containers_data.map { |status| Container.new(status) }
|
65
67
|
end
|
66
68
|
|
67
69
|
def containers_data
|
@@ -1,5 +1,15 @@
|
|
1
1
|
module Vidar
|
2
2
|
class SlackNotification
|
3
|
+
def self.get
|
4
|
+
new(
|
5
|
+
github: Config.get!(:github),
|
6
|
+
revision: Config.get!(:revision),
|
7
|
+
revision_name: Config.get!(:revision_name),
|
8
|
+
build_url: Config.build_url,
|
9
|
+
deploy_config: Config.deploy_config
|
10
|
+
)
|
11
|
+
end
|
12
|
+
|
3
13
|
def initialize(github:, revision:, revision_name:, deploy_config:, build_url: nil, connection: Faraday.new)
|
4
14
|
@github = github
|
5
15
|
@revision = revision
|
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.5.
|
4
|
+
version: 1.5.4
|
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: 2022-
|
12
|
+
date: 2022-11-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|