dopi 0.18.1 → 0.18.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76172f4760eaf3ed0a244457346f69b44901e51a
4
- data.tar.gz: 22e167ba7260b906a39cd3114056b8b6b2f6c5c0
3
+ metadata.gz: 77e99a3d8150126a8603955f6e19e34a8902ba2d
4
+ data.tar.gz: e8b99ece6efae4cd566d560f0d3925447201c795
5
5
  SHA512:
6
- metadata.gz: e3b32d4ab26d002dc7d6bf90ec174dd6ed39682000919e4d6cdf6024968cc419e6df7563e5cc9590cbc1cdc0680dcb7f697f720f2285e47cd859329f845e0742
7
- data.tar.gz: d18f82635f8fe8097b5ef3cb6b7393d0054c12a01bc390ee5c84d4177d5deb2490f95fa83bb8224d5af78faeb5b7d9c50c808b73210e35b01668b7b68c544a0c
6
+ metadata.gz: af686a937f4059bfaf2308c13779d96cb2c2ff9aa7058bf2d1b2927ca1c081e2880ecff14f63c0d3aaf4a79a90ec1441638692f5fbfb4118cd02b20ef7ad31e3
7
+ data.tar.gz: d1e57135fa7f9ba45d9d8a566c1a9cad43d5972dcd78385f9854542d09bbbbb74351bc8a34fae44fb178275799587ea4f24955e35b178b7e2c509d7a7c8a565c
@@ -1,6 +1,11 @@
1
1
  # Change Log
2
2
  All notable changes to DOPi will be documented in this file.
3
3
 
4
+ ## [0.18.2] - 2017-06-28
5
+ ### Fixed
6
+ - Puppet should now use the puppet in the search path per default
7
+ - The puppet binary can now be configured with puppet_bin
8
+
4
9
  ## [0.18.1] - 2017-05-24
5
10
  ### Fixed
6
11
  - Update dependencies
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dopi (0.18.0)
4
+ dopi (0.18.2)
5
5
  curses (~> 1)
6
6
  dop_common (~> 0.15, >= 0.15.0)
7
7
  gli (~> 2)
@@ -17,7 +17,7 @@ GEM
17
17
  curses (1.2.2)
18
18
  diff-lcs (1.3)
19
19
  docile (1.1.5)
20
- dop_common (0.15.0)
20
+ dop_common (0.15.1)
21
21
  hashdiff (~> 0.3, >= 0.3.1)
22
22
  lockfile (~> 2)
23
23
  rb-inotify (~> 0.9)
@@ -29,7 +29,7 @@ GEM
29
29
  gyoku (1.3.1)
30
30
  builder (>= 2.1.2)
31
31
  hashdiff (0.3.4)
32
- hiera (3.3.1)
32
+ hiera (3.4.0)
33
33
  httpclient (2.8.3)
34
34
  json (2.1.0)
35
35
  little-plugger (1.1.4)
@@ -38,7 +38,7 @@ GEM
38
38
  logging (2.2.2)
39
39
  little-plugger (~> 1.1)
40
40
  multi_json (~> 1.10)
41
- mcollective-client (2.10.4)
41
+ mcollective-client (2.11.0)
42
42
  json
43
43
  stomp
44
44
  systemu
@@ -47,8 +47,8 @@ GEM
47
47
  nori (2.6.0)
48
48
  parallel (1.11.2)
49
49
  rake (12.0.0)
50
- rb-inotify (0.9.8)
51
- ffi (>= 0.5.0)
50
+ rb-inotify (0.9.10)
51
+ ffi (>= 0.5.0, < 2)
52
52
  rspec (3.6.0)
53
53
  rspec-core (~> 3.6.0)
54
54
  rspec-expectations (~> 3.6.0)
@@ -75,7 +75,7 @@ GEM
75
75
  json (>= 1.8, < 3)
76
76
  simplecov-html (~> 0.10.0)
77
77
  simplecov-html (0.10.1)
78
- stomp (1.4.3)
78
+ stomp (1.4.4)
79
79
  systemu (2.6.5)
80
80
  winrm (2.2.3)
81
81
  builder (>= 2.1.2)
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ namespace :spec do
8
8
  hiera = 'spec/fixtures/puppet/hiera.yaml'
9
9
  plan = 'spec/fixtures/testenv_plan.yaml'
10
10
  sh('bundle package --all')
11
- sh("bundle exec bin/dopi --verbosity debug --trace --hiera_yaml #{hiera} oneshot #{plan}")
11
+ sh("bundle exec bin/dopi --hiera_yaml #{hiera} oneshot #{plan}")
12
12
  end
13
13
  end
14
14
 
@@ -19,10 +19,6 @@ module Dopi
19
19
  super(command_parser, step, node, is_verify_command)
20
20
  end
21
21
 
22
- def puppet_bin
23
- '/usr/bin/puppet'
24
- end
25
-
26
22
  def check_run_lock
27
23
  ssh_command(env, "test -f $(#{puppet_bin} config print statedir)/agent_catalog_run.lock")
28
24
  end
@@ -19,14 +19,6 @@ module Dopi
19
19
  super(command_parser, step, node, is_verify_command)
20
20
  end
21
21
 
22
- def puppet_bin
23
- 'puppet'
24
- end
25
-
26
- def check_run_lock_b
27
- false
28
- end
29
-
30
22
  def check_run_lock
31
23
  winrm_powershell_command <<-cmd
32
24
  $Statedir = #{puppet_bin} config print statedir
@@ -2,6 +2,8 @@
2
2
  # This is a mixin for command plugins that need to parse puppet_run specific
3
3
  # options and for some methods to wrap the rerun logic.
4
4
  #
5
+ require 'pathname'
6
+
5
7
  module Dopi
6
8
  module CommandParser
7
9
  module PuppetRun
@@ -19,6 +21,7 @@ module Dopi
19
21
  log_validation_method('rerun_on_error_valid?', CommandParsingError)
20
22
  log_validation_method('max_rerun_valid?', CommandParsingError)
21
23
  log_validation_method('wait_if_already_running_valid?', CommandParsingError)
24
+ log_validation_method('puppet_bin_valid?', CommandParsingError)
22
25
  end
23
26
 
24
27
  def rerun_on_change
@@ -37,6 +40,10 @@ module Dopi
37
40
  @wait_if_already_running ||= wait_if_already_running_valid? ? hash[:wait_if_already_running] : true
38
41
  end
39
42
 
43
+ def puppet_bin
44
+ @puppet_bin ||= puppet_bin_valid? ? hash[:puppet_bin] : 'puppet'
45
+ end
46
+
40
47
  def run
41
48
  runs = 0
42
49
  loop do
@@ -144,6 +151,17 @@ module Dopi
144
151
  raise CommandParsingError, "Plugin #{name}: The value for 'wait_if_already_running' must be boolean"
145
152
  end
146
153
 
154
+ def puppet_bin_valid?
155
+ return false unless hash.kind_of?(Hash)
156
+ return false if hash[:puppet_bin].nil? # is optional
157
+ begin
158
+ Pathname.new(hash[:puppet_bin]).absolute? or hash[:puppet_bin][/[a-zA-Z]+:\\/] or hash[:puppet_bin][/\\\\\w+/] or
159
+ raise CommandParsingError, "Plugin #{name}: The path for 'puppet_bin' has to be absolute"
160
+ rescue ArgumentError => e
161
+ raise CommandParsingError, "Plugin #{name}: The value in 'puppet_bin' is not a valid file path: #{e.message}"
162
+ end
163
+ end
164
+
147
165
  end
148
166
  end
149
167
  end
@@ -1,3 +1,3 @@
1
1
  module Dopi
2
- VERSION = '0.18.1'
2
+ VERSION = '0.18.2'
3
3
  end
@@ -130,7 +130,7 @@ steps:
130
130
  - plugin: 'ssh/custom'
131
131
  exec: 'gem list | grep dop_common'
132
132
  plugin: 'ssh/custom'
133
- exec: 'cd /vagrant/vendor/cache/dop_common-*/ && gem build dop_common.gemspec && gem install dop_common*.gem'
133
+ exec: 'gem install dop_common'
134
134
 
135
135
  - name: 'Install DOPi so we can add the plan'
136
136
  roles: 'puppetmaster'
@@ -148,7 +148,7 @@ steps:
148
148
  command:
149
149
  verify_commands:
150
150
  - plugin: 'ssh/file_exists'
151
- file: '/var/lib/dop/plans/build_dop_test_environment.yaml'
151
+ file: '/var/lib/dop/cache/build_dop_test_environment/dopi.yaml'
152
152
  plugin: 'ssh/custom'
153
153
  exec: 'bundle'
154
154
  arguments: 'exec dopi add /vagrant/spec/fixtures/testenv_plan.yaml'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dopi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Zuber
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-31 00:00:00.000000000 Z
12
+ date: 2017-06-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler