puppet_litmus 0.21.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/matrix_from_metadata +1 -1
- data/lib/puppet_litmus/puppet_helpers.rb +11 -3
- data/lib/puppet_litmus/rake_helper.rb +1 -1
- data/lib/puppet_litmus/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09a793d09382a0f461b0390ebb71f94ae4a14df41873d44a77f2006ee15934bf'
|
4
|
+
data.tar.gz: eced3b1aceb10d8fc85f90dd15ab3cfc300f793b85e2f516548510d59bd9ab4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2226c90e2928e78e44ab3faf2ff837da356934ea89768637b7943c32d615b3c04ff605a00063dff6ad24126ac5e9a43f2e86f16c6385132bbc9c4ba7a27b82e
|
7
|
+
data.tar.gz: 5651ff30427d4f96b72440c28458251e00c4c595df98a602130fa95aec6f18c1f5d378d2a737ece3c918367cd38933f7aa615733ffc0c5ee77e6240f4fd82db8
|
data/exe/matrix_from_metadata
CHANGED
@@ -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
|
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
|
-
|
89
|
-
|
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:
|
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
|
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.
|
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-
|
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.
|
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.
|