mobilize-ssh 1.0.84 → 1.0.91
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mobilize-ssh/handlers/ssh.rb +4 -1
- data/lib/mobilize-ssh/version.rb +1 -1
- data/mobilize-ssh.gemspec +1 -1
- data/test/mobilize-ssh_test.rb +2 -2
- data/test/ssh_job_rows.yml +2 -2
- metadata +4 -4
@@ -186,7 +186,10 @@ module Mobilize
|
|
186
186
|
elsif su_user.nil? and Ssh.su_all_users(node)
|
187
187
|
su_user = u.name
|
188
188
|
end
|
189
|
-
Ssh.run(node,command,file_hash,su_user)
|
189
|
+
out_tsv = Ssh.run(node,command,file_hash,su_user)
|
190
|
+
#use Gridfs to cache result
|
191
|
+
out_url = "gridfs://#{s.path}/out"
|
192
|
+
Dataset.write_to_url(out_url,out_tsv)
|
190
193
|
end
|
191
194
|
end
|
192
195
|
end
|
data/lib/mobilize-ssh/version.rb
CHANGED
data/mobilize-ssh.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
|
-
gem.add_runtime_dependency "mobilize-base","1.0.
|
19
|
+
gem.add_runtime_dependency "mobilize-base","1.0.91"
|
20
20
|
gem.add_runtime_dependency "net-ssh"
|
21
21
|
gem.add_runtime_dependency "net-scp"
|
22
22
|
gem.add_runtime_dependency "net-ssh-gateway"
|
data/test/mobilize-ssh_test.rb
CHANGED
@@ -43,9 +43,9 @@ describe "Mobilize" do
|
|
43
43
|
ssh_job_rows.map{|j| r.jobs(j['name'])}.each{|j| j.delete if j}
|
44
44
|
jobs_sheet.add_or_update_rows(ssh_job_rows)
|
45
45
|
|
46
|
-
puts "job row added, force
|
46
|
+
puts "job row added, force enqueue runner, wait 150s"
|
47
47
|
r.enqueue!
|
48
|
-
sleep
|
48
|
+
sleep 150
|
49
49
|
|
50
50
|
puts "update job status and activity"
|
51
51
|
r.update_gsheet(gdrive_slot)
|
data/test/ssh_job_rows.yml
CHANGED
@@ -6,13 +6,13 @@
|
|
6
6
|
stage2: 'gsheet.write source:"stage1", target:"Runner_mobilize(test)/test_ssh_1.out"'
|
7
7
|
- name: test_ssh_2
|
8
8
|
active: true
|
9
|
-
trigger:
|
9
|
+
trigger: "after test_ssh_1"
|
10
10
|
status: ""
|
11
11
|
stage1: 'ssh.run node:"test_node", cmd:"sh code.sh", su_user:"root", source:"Runner_mobilize(test)/code.sh"'
|
12
12
|
stage2: 'gsheet.write source:"stage1", target:"Runner_mobilize(test)/test_ssh_2.out"'
|
13
13
|
- name: test_ssh_3
|
14
14
|
active: true
|
15
|
-
trigger:
|
15
|
+
trigger: "after test_ssh_2"
|
16
16
|
status: ""
|
17
17
|
stage1: 'ssh.run node:"test_node", cmd:"whoami"'
|
18
18
|
stage2: 'gsheet.write source:"stage1", target:"Runner_mobilize(test)/test_ssh_3.out"'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mobilize-ssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.91
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mobilize-base
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.0.
|
21
|
+
version: 1.0.91
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.0.
|
29
|
+
version: 1.0.91
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: net-ssh
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|