puppet_litmus 0.21.0 → 0.22.0

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: f31e0247c29a20874c704110cac6c6f9c9724624a3fc4bbe1dafd872eee85131
4
- data.tar.gz: b940b92982bd7d55861d963ee99f3bc653888063f5d1a304686b276350b18e0e
3
+ metadata.gz: '09a793d09382a0f461b0390ebb71f94ae4a14df41873d44a77f2006ee15934bf'
4
+ data.tar.gz: eced3b1aceb10d8fc85f90dd15ab3cfc300f793b85e2f516548510d59bd9ab4c
5
5
  SHA512:
6
- metadata.gz: 7c0272e6b4f6b840b1a294832fa4a5ec8e7b1159f3c08105fbc490e40dbc7535c1297d0f544ac19ce7730b78232944edc06951c0eb3393d39d5fc66b5f49198e
7
- data.tar.gz: 9a29fff33eddf104445edbf5b9c7e2ce31f0a67d9da9d9e4d52eb32699f822062e9dee75a2d7c52aecb7bd2a1de6d6aff866708b5dd3d719b96df0af00906b88
6
+ metadata.gz: b2226c90e2928e78e44ab3faf2ff837da356934ea89768637b7943c32d615b3c04ff605a00063dff6ad24126ac5e9a43f2e86f16c6385132bbc9c4ba7a27b82e
7
+ data.tar.gz: 5651ff30427d4f96b72440c28458251e00c4c595df98a602130fa95aec6f18c1f5d378d2a737ece3c918367cd38933f7aa615733ffc0c5ee77e6240f4fd82db8
@@ -37,7 +37,7 @@ DOCKER_PLATFORMS = [
37
37
  # comparison when evaluating puppet requirements from the metadata
38
38
  COLLECTION_TABLE = {
39
39
  '5.5.22' => 'puppet5',
40
- '6.19.1' => 'puppet6',
40
+ '6.19.1' => 'puppet6-nightly',
41
41
  '7.0.0' => 'puppet7-nightly',
42
42
  }.freeze
43
43
 
@@ -30,7 +30,7 @@ module PuppetLitmus::PuppetHelpers
30
30
  # :catch_failures [Boolean] (false) We're after only complete success so allow exit codes 0 and 2 only.
31
31
  # :expect_failures [Boolean] (false) We're after failures specifically so allow exit codes 1, 4, and 6 only.
32
32
  # :manifest_file_location [Path] The place on the target system.
33
- # :hiera_config [Path] The path to the hiera.yaml configuration on the runner.
33
+ # :hiera_config [Path] The path to the hiera.yaml configuration on the target.
34
34
  # :prefix_command [String] prefixes the puppet apply command; eg "export LANGUAGE='ja'".
35
35
  # :trace [Boolean] run puppet apply with the trace flag (defaults to `true`).
36
36
  # :debug [Boolean] run puppet apply with the debug flag.
@@ -83,11 +83,19 @@ module PuppetLitmus::PuppetHelpers
83
83
  command_to_run += ' --noop' if !opts[:noop].nil? && (opts[:noop] == true)
84
84
  command_to_run += ' --detailed-exitcodes' if use_detailed_exit_codes == true
85
85
 
86
+ command_to_run = "try { #{command_to_run}; exit $LASTEXITCODE } catch { write-error $_ ; exit 1 }" if os[:family] == 'windows'
87
+
86
88
  span.add_field('litmus.command_to_run', command_to_run)
87
89
  span.add_field('litmus.target_node_name', target_node_name)
88
- bolt_result = run_command(command_to_run, target_node_name, config: nil, inventory: inventory_hash)
89
- span.add_field('litmus.bolt_result', bolt_result)
90
+ # IAC-1365 - Workaround for BOLT-1535 and bolt issue #1650
91
+ # bolt_result = run_command(command_to_run, target_node_name, config: nil, inventory: inventory_hash)
92
+ bolt_result = Tempfile.open(['temp', '.ps1']) do |script|
93
+ script.write(command_to_run)
94
+ script.close
95
+ run_script(script.path, target_node_name, [], options: {}, config: nil, inventory: inventory_hash)
96
+ end
90
97
 
98
+ span.add_field('litmus.bolt_result', bolt_result)
91
99
  result = OpenStruct.new(exit_code: bolt_result.first['value']['exit_code'],
92
100
  stdout: bolt_result.first['value']['stdout'],
93
101
  stderr: bolt_result.first['value']['stderr'])
@@ -464,7 +464,7 @@ module PuppetLitmus::RakeHelper
464
464
 
465
465
  class LitmusTimeoutError < StandardError; end
466
466
 
467
- def with_retries(options: { tries: Float::INFINITY }, max_wait_minutes: 5)
467
+ def with_retries(options: { tries: Float::INFINITY }, max_wait_minutes: 8)
468
468
  stop = Time.now + (max_wait_minutes * 60)
469
469
  Retryable.retryable(options.merge(not: [LitmusTimeoutError])) do
470
470
  raise LitmusTimeoutError if Time.now > stop
@@ -2,5 +2,5 @@
2
2
 
3
3
  # version of this gem
4
4
  module PuppetLitmus
5
- VERSION ||= '0.21.0'
5
+ VERSION ||= '0.22.0'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet_litmus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet, Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-12 00:00:00.000000000 Z
11
+ date: 2021-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bolt
@@ -194,7 +194,7 @@ homepage: https://github.com/puppetlabs/puppet_litmus
194
194
  licenses:
195
195
  - Apache-2.0
196
196
  metadata: {}
197
- post_install_message:
197
+ post_install_message:
198
198
  rdoc_options: []
199
199
  require_paths:
200
200
  - lib
@@ -209,8 +209,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  - !ruby/object:Gem::Version
210
210
  version: '0'
211
211
  requirements: []
212
- rubygems_version: 3.1.4
213
- signing_key:
212
+ rubygems_version: 3.0.3
213
+ signing_key:
214
214
  specification_version: 4
215
215
  summary: Providing a simple command line tool for puppet content creators, to enable
216
216
  simple and complex test deployments.