elastic_manager 0.3.2 → 0.3.3

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: cb3d5e533bbd47c6ce7f446a7d499e04d5c6976b89c9817f72896f898bd8f811
4
- data.tar.gz: 425494d9d0883728b21e47c12b9c8d046b452a794ef7b0d7a97cf60a737f5378
3
+ metadata.gz: 79ec78560ed7b1857d5012b63be963a7ed37e8efa01a145baf90c40e566b0630
4
+ data.tar.gz: ffc4dd9850c466f9ab5d68903af80c4f76d4f08dd62273399de8f1f296d3c3ab
5
5
  SHA512:
6
- metadata.gz: '0178e1be7c552d4bfbbdf2ff5249e389538c955716ce343e96631707c72e867808c7098818087dc16e0b98d0a9334bd74a0ba5ade567a7ef6dd5ffc175dd800b'
7
- data.tar.gz: 9ffe5be887071a4a0bddcd03bc62961680a30617666965a0d22530176591abbb0d8f0cd4238e6ec12103c6f58df200564e8bde974964c3528b91087f4881d78d
6
+ metadata.gz: b265ee6bb8a6b72ce5e8020914c1431b274da8bd3f7763e1ffe2c43d4a7327d5e297ec6f5910c770dd2c88b1f494c5320010b33eb5096ee3ca0cfd2f8b02bceb
7
+ data.tar.gz: 6f3948df1aa00c4946742d59e23d2cfe4ba795aa8f96601a991ab8d37b5e317da1ee71c28d157b1c277af08680b3881bca8790391faea5cb6297894a413dbf12
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'elastic_manager'
5
5
  s.executables = ['elastic_manager']
6
- s.version = '0.3.2'
6
+ s.version = '0.3.3'
7
7
  s.date = '2018-10-15'
8
8
  s.summary = 'Because qurator sucks'
9
9
  s.description = 'Manager for logstash indices in elastic'
@@ -35,6 +35,8 @@ module Open
35
35
  end
36
36
 
37
37
  def do_open(indices)
38
+ results = []
39
+
38
40
  indices.each do |index|
39
41
  next if skip_index?(index, 'open')
40
42
 
@@ -43,14 +45,19 @@ module Open
43
45
  if index_exist?(response)
44
46
  next if already?(response, 'open')
45
47
 
46
- elastic_action_with_log('open_index', index)
48
+ results << elastic_action_with_log('open_index', index)
47
49
  else
48
50
  log.warn "#{index} index not found"
49
51
  log.info "#{index} trying snapshot restore"
50
52
 
51
- elastic_action_with_log('restore_snapshot', index, @config['settings']['box_types']['store'])
53
+ results << elastic_action_with_log('restore_snapshot', index, @config['settings']['box_types']['store'])
52
54
  end
53
55
  end
56
+
57
+ exit 1 if results.all? { |e| e.is_a?(FalseClass) }
58
+ # It is little bit confusing, but we catch exit code 2 in jenkins
59
+ # for mark build as unstable instead of just fail it
60
+ exit 2 if results.any? { |e| e.is_a?(FalseClass) }
54
61
  end
55
62
 
56
63
  def open
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antony Ryabov