rundock 1.1.4 → 1.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/lib/rundock/builder/operation_builder.rb +2 -0
- data/lib/rundock/operation/task.rb +1 -2
- data/lib/rundock/version.rb +1 -1
- data/spec/integration/platforms/localhost/scenarios/task_with_recursive_args_scenario.yml +15 -0
- data/spec/integration/recipes/task_with_recursive_args_spec.rb +11 -0
- data/spec/integration/scenarios/task_with_recursive_args_scenario.yml +21 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f14472ccefd47f2343c17934f3a59c1942b19554
|
4
|
+
data.tar.gz: e76b60e727665179ef6f25f6852d3855041d31f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07c04ad61de0ca22ec4119523e98aee2533da4dba31fb3f5f2217e41906e331167b437b15361e13d6ff3e82ea9136f7e5d87522c769e27799d26c8df08001fae
|
7
|
+
data.tar.gz: 587f5eb7be9c3d8a2234fd37ab82db2ff6cb6df3b839d95e108c31b8f79547445d69f99de3bb4b09bb4d51960eaa0b39ab84e50c5eec711ddab4981c9573dbc8
|
data/CHANGELOG.md
CHANGED
@@ -58,6 +58,8 @@ module Rundock
|
|
58
58
|
node = Node.new(node_attribute.nodename, backend)
|
59
59
|
scen = Scenario.new
|
60
60
|
|
61
|
+
node_attribute.define_attr(:parrent_task_args, node_attribute.task_args) if node_attribute.respond_to?(:task_args)
|
62
|
+
|
61
63
|
tasks.each do |k, v|
|
62
64
|
ope = build_operations(k, Array(v), node_attribute, nil, true)
|
63
65
|
node.add_operation(ope) if ope
|
@@ -3,13 +3,12 @@ module Rundock
|
|
3
3
|
class Task < Base
|
4
4
|
def run(backend, attributes = {})
|
5
5
|
@instruction.each do |i|
|
6
|
-
previous_args = attributes[:task_args]
|
7
6
|
task_set = i.split(' ')
|
8
7
|
task_name = task_set.first
|
9
8
|
|
10
9
|
if task_set.length > 1
|
11
10
|
attributes[:task_args] = task_set.slice(1..-1).map do |arg|
|
12
|
-
assign_args(arg,
|
11
|
+
assign_args(arg, attributes[:parrent_task_args])
|
13
12
|
end
|
14
13
|
end
|
15
14
|
|
data/lib/rundock/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
- target: localhost
|
2
|
+
command:
|
3
|
+
- "rm -f /var/tmp/hello_rundock_from_task_with_recursive_a_b_1_2_scenario"
|
4
|
+
- "rm -f /var/tmp/hello_rundock_from_task_with_recursive_1_2_c_d_scenario"
|
5
|
+
task:
|
6
|
+
- task_1 1 2
|
7
|
+
---
|
8
|
+
---
|
9
|
+
task_1:
|
10
|
+
task:
|
11
|
+
- task_2 a b $1 $2
|
12
|
+
- task_2 $1 $2 c d
|
13
|
+
task_2:
|
14
|
+
command:
|
15
|
+
- "echo 'Hello Rundock from task with recursive Scenario.' > /var/tmp/hello_rundock_from_task_with_recursive_$1_$2_$3_$4_scenario"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe file('/var/tmp/hello_rundock_from_task_with_recursive_a_b_1_2_scenario') do
|
4
|
+
it { should be_file }
|
5
|
+
its(:content) { should match(/Hello Rundock from task with recursive Scenario./) }
|
6
|
+
end
|
7
|
+
|
8
|
+
describe file('/var/tmp/hello_rundock_from_task_with_recursive_1_2_c_d_scenario') do
|
9
|
+
it { should be_file }
|
10
|
+
its(:content) { should match(/Hello Rundock from task with recursive Scenario./) }
|
11
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
- target: anyhost-01
|
2
|
+
command:
|
3
|
+
- "rm -f /var/tmp/hello_rundock_from_task_with_recursive_a_b_1_2_scenario"
|
4
|
+
- "rm -f /var/tmp/hello_rundock_from_task_with_recursive_1_2_c_d_scenario"
|
5
|
+
task:
|
6
|
+
- task_1 1 2
|
7
|
+
---
|
8
|
+
anyhost-01:
|
9
|
+
host: <replaced_by_platforms_host>
|
10
|
+
ssh_opts:
|
11
|
+
port: <replaced_by_platforms_port>
|
12
|
+
user: tester
|
13
|
+
key: "<replaced_by_platforms_key>"
|
14
|
+
---
|
15
|
+
task_1:
|
16
|
+
task:
|
17
|
+
- task_2 a b $1 $2
|
18
|
+
- task_2 $1 $2 c d
|
19
|
+
task_2:
|
20
|
+
command:
|
21
|
+
- "echo 'Hello Rundock from task with recursive Scenario.' > /var/tmp/hello_rundock_from_task_with_recursive_$1_$2_$3_$4_scenario"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rundock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hiracy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -223,6 +223,7 @@ files:
|
|
223
223
|
- spec/integration/platforms/localhost/scenarios/target_group_scenario.yml
|
224
224
|
- spec/integration/platforms/localhost/scenarios/task_by_option_scenario.yml
|
225
225
|
- spec/integration/platforms/localhost/scenarios/task_with_args_scenario.yml
|
226
|
+
- spec/integration/platforms/localhost/scenarios/task_with_recursive_args_scenario.yml
|
226
227
|
- spec/integration/platforms/localhost/scenarios/use_default_ssh_scenario.yml
|
227
228
|
- spec/integration/platforms/localhost/targets/target_by_option.yml
|
228
229
|
- spec/integration/recipes/cwd_spec.rb
|
@@ -240,6 +241,7 @@ files:
|
|
240
241
|
- spec/integration/recipes/target_by_option_spec.rb
|
241
242
|
- spec/integration/recipes/task_by_option_spec.rb
|
242
243
|
- spec/integration/recipes/task_with_args_spec.rb
|
244
|
+
- spec/integration/recipes/task_with_recursive_args_spec.rb
|
243
245
|
- spec/integration/scenarios/all_file_hooks_by_option_scenario.yml
|
244
246
|
- spec/integration/scenarios/cwd_scenario.yml
|
245
247
|
- spec/integration/scenarios/deploy_args_scenario.yml
|
@@ -255,6 +257,7 @@ files:
|
|
255
257
|
- spec/integration/scenarios/target_group_scenario.yml
|
256
258
|
- spec/integration/scenarios/task_by_option_scenario.yml
|
257
259
|
- spec/integration/scenarios/task_with_args_scenario.yml
|
260
|
+
- spec/integration/scenarios/task_with_recursive_args_scenario.yml
|
258
261
|
- spec/integration/scenarios/use_default_ssh_scenario.yml
|
259
262
|
- spec/integration/spec_helper.rb
|
260
263
|
- spec/integration/targets/target_by_option.yml
|