vidar 1.5.3 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0285b9b472201e5b27b1f212e11e131216730a58324e814e8d6683576572f545'
4
- data.tar.gz: 1193d600fd742c6dd97b54e0449dea7d62d92ba356c4e4fceab8cb50b479edbe
3
+ metadata.gz: c00bab992d33cc5485394ff4942569a73b4b0a8ae6aba4a64d96db922edfa46e
4
+ data.tar.gz: bc83c5d33cffae2c695d40e61378b5fb2326a789016a73b80be6df0c10c3177c
5
5
  SHA512:
6
- metadata.gz: cfca6ad6fa6cb6f4a99b197f4a1b56e8ee6ca456e768849d76b431c958330cd0c2e2463495101f4bc71d1337ff958ba4cb55dd47aba2b761e1873c2c513d8380
7
- data.tar.gz: 293becab50473d6d600d6ae36e2374db88c839798cbc51ae6fed100780f1f8717f7bb442c18742a6840f115ecff5c0b7d87a027928f1be16c4a4223b19f362a3
6
+ metadata.gz: b3afdc47337321ea2bb3af105de27a5be2bab972e2e81f8c63c47d6deb9c8becbae9e90eba764a905c1262f54e5842269242db011ba5d6c643686627f377ff5c
7
+ data.tar.gz: d81b57bc6be8eccb2d370424167655ace1a74fff390bdd391d2ff1ce0527623f001c99b66f266b1319fc109de15e092cb4edd93886fde4c0a15757e37a80442d
data/.bundler-version CHANGED
@@ -1 +1 @@
1
- 2.3.22
1
+ 2.3.25
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vidar (1.5.3)
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.5.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.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.5.0)
37
+ regexp_parser (2.6.1)
38
38
  rexml (3.2.5)
39
- rspec (3.11.0)
40
- rspec-core (~> 3.11.0)
41
- rspec-expectations (~> 3.11.0)
42
- rspec-mocks (~> 3.11.0)
43
- rspec-core (3.11.0)
44
- rspec-support (~> 3.11.0)
45
- rspec-expectations (3.11.1)
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.11.0)
48
- rspec-mocks (3.11.1)
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.11.0)
51
- rspec-support (3.11.1)
52
- rubocop (1.36.0)
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.20.1, < 2.0)
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.21.0)
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.13.1)
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.new(
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Vidar
2
- VERSION = '1.5.3'.freeze
2
+ VERSION = '1.5.4'.freeze
3
3
  end
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.3
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-09-21 00:00:00.000000000 Z
12
+ date: 2022-11-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize