cnvrg 1.4.0 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cnvrg/helpers/executer.rb +11 -3
- data/lib/cnvrg/job_cli.rb +9 -0
- data/lib/cnvrg/project.rb +1 -1
- data/lib/cnvrg/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e51c1599e69f0ff7f24d21be3f57ebd23d807cb7258d8c81ee5d145db465154
|
4
|
+
data.tar.gz: 1aa2d68669c4c2518992d8a65e7520ace1cc780819fa359634bd0e550fe24a6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9951ed4b4784b39d628811f9e7de7d75a3c2630b2a00639e334fe3839d82dda3e89ec3a2526f79d4cd7d551578bd05a4a94886029fc783b731cee1d5a4fa603a
|
7
|
+
data.tar.gz: 713605a0d638c94defc308663cde0fb5e0765de3d6f7e23160ba4d71038002d2a575ad9a7827c8c81ec54b2e4958330eebcfa3d36321af1b4f9dd20999390a2d
|
@@ -58,12 +58,20 @@ class Cnvrg::Helpers::Executer
|
|
58
58
|
def execute_cmds(cmds)
|
59
59
|
cmds.each do |command|
|
60
60
|
puts "===================="
|
61
|
-
|
61
|
+
if command[:type] == "file_exists"
|
62
|
+
puts "Looking for file #{command[:file]}"
|
63
|
+
else
|
64
|
+
puts "Execute #{command[:command]}"
|
65
|
+
end
|
62
66
|
execute(command)
|
63
|
-
puts "===================="
|
64
67
|
end
|
65
68
|
end
|
66
69
|
|
70
|
+
def get_requirements_commands
|
71
|
+
resp = Cnvrg::API.request("#{base_url}/requirements", "GET")
|
72
|
+
commands = resp["commands"]
|
73
|
+
commands.map{|k| k.with_indifferent_access}
|
74
|
+
end
|
67
75
|
|
68
76
|
private
|
69
77
|
def execute_helper(cmd)
|
@@ -110,7 +118,7 @@ class Cnvrg::Helpers::Executer
|
|
110
118
|
errors = []
|
111
119
|
output = []
|
112
120
|
start_time = Time.now
|
113
|
-
timeout = cmd[:timeout] ||
|
121
|
+
timeout = cmd[:timeout] || 5*60
|
114
122
|
t = Thread.new do
|
115
123
|
PTY.spawn(cmd[:command]) do |stdout, stdin, pid, stderr|
|
116
124
|
begin
|
data/lib/cnvrg/job_cli.rb
CHANGED
@@ -29,5 +29,14 @@ module Cnvrg
|
|
29
29
|
@project = Project.new(project_dir, owner: ENV['CNVRG_OWNER'], slug: ENV['CNVRG_PROJECT'])
|
30
30
|
end
|
31
31
|
|
32
|
+
desc 'install_reqs', description: 'Install requirements', hide: true
|
33
|
+
def install_reqs
|
34
|
+
cli = Cnvrg::CLI.new
|
35
|
+
cli.log_start(__method__, args, options)
|
36
|
+
@project = Project.new(nil, owner: ENV['CNVRG_OWNER'], slug: ENV['CNVRG_PROJECT'])
|
37
|
+
@executer = Helpers::Executer.new(project: @project, job_type: ENV['CNVRG_JOB_TYPE'], job_id: ENV['CNVRG_JOB_ID'])
|
38
|
+
commands = @executer.get_requirements_commands
|
39
|
+
@executer.execute_cmds(commands)
|
40
|
+
end
|
32
41
|
end
|
33
42
|
end
|
data/lib/cnvrg/project.rb
CHANGED
@@ -471,7 +471,7 @@ module Cnvrg
|
|
471
471
|
return response
|
472
472
|
end
|
473
473
|
|
474
|
-
|
474
|
+
def compare_idx(new_branch, force:false, deploy: false, in_exp:false, specific_files: [], download: false)
|
475
475
|
is_download = download
|
476
476
|
if is_download
|
477
477
|
local_idx = self.get_idx
|
data/lib/cnvrg/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cnvrg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yochay Ettun
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-05-
|
13
|
+
date: 2019-05-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -432,7 +432,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
432
432
|
- !ruby/object:Gem::Version
|
433
433
|
version: '0'
|
434
434
|
requirements: []
|
435
|
-
|
435
|
+
rubyforge_project:
|
436
|
+
rubygems_version: 2.7.9
|
436
437
|
signing_key:
|
437
438
|
specification_version: 4
|
438
439
|
summary: A CLI tool for interacting with cnvrg.io.
|