tiller 0.9.4 → 0.9.5

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/tiller +23 -4
  3. data/lib/tiller/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a9e59b53054ab622d4627c753fa3dfd770e96d2
4
- data.tar.gz: 06b68072cad4551bd719d75a781dda4a615e2684
3
+ metadata.gz: 969709faff86bb0c4fc5bf2e31a315597fa10d50
4
+ data.tar.gz: 1f0ee6caa52d3328b942bf1f86ef30f30be1853c
5
5
  SHA512:
6
- metadata.gz: 5505a2fb4696e0ebeccf32b57d3ec8ae6709f5dd0498681ff8c01623a5a542beb3f9d4f21b98a116428cb629d5610d2224d4b904c87a50bb98891528360344fe
7
- data.tar.gz: e57a8bf3bd36f48fb7c9fa37f4bb9a2e530cb11b23b2a0b5ce0403aa791d6695b3dcd3dddb5db29bb62ca93acbd6640546118b7c0955f1607a89bc8b4fd6384d
6
+ metadata.gz: 8110a45a9c7703ca5cc92f8b1d2f5577fd03f1632cbd463469ddbc6fb675f84c17294f23bcdfa219bdaa5723924a2cbe287f81cde462b0d1f73bc4b0666079aa
7
+ data.tar.gz: 8e3330c3a86eb00a7d7f8411ba42ddf1b00b977f744f6ef6bc6840fb2f1c2f64366f2f7596822a624361b396785909aa329fe002a455bb0bfc5c4f2c14886a7a
data/bin/tiller CHANGED
@@ -47,12 +47,31 @@ module Tiller
47
47
  # Add tiller_lib to the LOAD PATH so we can pull in user-defined plugins
48
48
  $LOAD_PATH.unshift(config[:tiller_lib]) unless $LOAD_PATH.include?(config[:tiller_lib])
49
49
 
50
- # Load the common YAML configuration file
50
+ # Load the common YAML configuration files
51
51
  begin
52
+ config_loaded = false
53
+
54
+ # Is there a common.yaml ? If so, load that first
52
55
  common_file = File.join(config[:tiller_base], 'common.yaml')
53
- config.merge!(YAML.load(open(common_file)))
56
+ if File.exists?(common_file)
57
+ config.merge!(YAML.load(open(common_file)))
58
+ config_loaded = true
59
+ end
60
+
61
+ # Load and deep merge anything under config.d if present
62
+ config_d_dir = File.join(config[:tiller_base], 'config.d')
63
+ Dir.glob(File.join(config_d_dir, '**', '*.yaml')).each do |f|
64
+ log.info("Loading config file #{f}")
65
+ config.deep_merge!(YAML.load(open(f)))
66
+ config_loaded = true
67
+ end
68
+
54
69
  rescue StandardError => e
55
- abort "Error : Could not open common configuration file!\n#{e}"
70
+ abort "Error : Could not open common configuration files!\n#{e}"
71
+ end
72
+
73
+ unless config_loaded
74
+ abort "Error: No configuration files present!"
56
75
  end
57
76
 
58
77
  # Check for keys only present in v2 format (everything in one common.yaml)
@@ -247,7 +266,7 @@ module Tiller
247
266
  Process.wait(child_pid)
248
267
 
249
268
  # Capture the child process status, so we can also exit with this code
250
- exit_status = $?.exitstatus
269
+ exit_status = ($?.exitstatus == nil) ? 0 : $?.exitstatus
251
270
 
252
271
  log.info("Child process exited with status #{exit_status}")
253
272
  log.info('Child process finished, Tiller is stopping.')
@@ -1 +1 @@
1
- VERSION="0.9.4"
1
+ VERSION="0.9.5"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Dastmalchi-Round
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-21 00:00:00.000000000 Z
11
+ date: 2016-10-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A tool to create configuration files from a variety of sources, particularly
14
14
  useful for Docker containers. See https://github.com/markround/tiller for examples