cnvrg 1.5.9.3 → 1.5.9.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cd968f10c85f7ae44f6aa2e8b6c984af39800d4ae7f9b18e8576b4af4a270c5
4
- data.tar.gz: 554e2bde79bc67e08ec590ec84d800be4058480f7d2916c6245a90763abd2e59
3
+ metadata.gz: 1038150f013eb708622bf134d1cb94e8c861fe5ef6ca0d545d7c641f78fa4dd0
4
+ data.tar.gz: 97b7028be08f49a1d391af78bd2be2f8ffc136f410b1a9e5065a2d4a819ee15c
5
5
  SHA512:
6
- metadata.gz: 0dd2751240b216d424e2829850be011877b741459156edccf532291a87474965eac06041a7e9e8ae021daa798ac2d8de62ad325eb3775a14d71a2791cb16c5d9
7
- data.tar.gz: 5961b0e18892c237974273e0979866a16e865295db71c5b7b8dd83077bf6a05f6f13ed9f8b32b10d986eb9f1485206a450a57792567fdebb5b741717558a6268
6
+ metadata.gz: 5fd3a2219fc4a362be0b6cf22f50e4bba86f7b98f344ec1ff57302bde94de59394a12aa4717221d17571727381ed93218b05cca4f0c074d1fcbde2fcff0f44af
7
+ data.tar.gz: d017620576ab73330cd3f694c3008aa846d6212a3c31b44ab10027b585c78a047fe701ac8c83114fb2130642c67668f80906af9be2231b989dfec70a48be5605
@@ -166,7 +166,7 @@ class Cnvrg::Helpers::Executer
166
166
  puts "Kill thread because of timeout..."
167
167
  errors << {log: "Timeout", timestamp: Time.now}
168
168
  Thread.kill(t)
169
- exit_status = -100 ##killed
169
+ exit_status = 100 ##killed
170
170
  end
171
171
  sleep 1
172
172
  end
data/lib/cnvrg/image.rb CHANGED
@@ -36,19 +36,22 @@ module Cnvrg
36
36
  command = {:type=>"notify",
37
37
  :title=>"docker build",
38
38
  :logs=>true,
39
+ :before_execute_log=>"Building docker image",
40
+ :timeout=>3600,
39
41
  :command=>"sudo docker build . -t #{image_data["docker_name"]} -f #{file_name}"}
40
-
41
42
  @executer = Helpers::Executer.new(project: @project, job_type: "image", job_id: @image_id, image: self)
42
43
  exit_status, output, errors, _, _ = @executer.execute(command)
43
44
  all_logs = join_logs(output, errors)
44
- if exit_status > 0
45
+ if exit_status != 0
45
46
  raise StandardError.new(all_logs)
46
47
  end
48
+
47
49
  if ENV["CNVRG_IMAGE_BUILD_USERNAME"].present? and ENV["CNVRG_IMAGE_BUILD_PASSWORD"].present?
48
50
  command = {:type=>"notify",
49
51
  :no_stdout => true,
50
52
  :title=>"docker login",
51
53
  :logs=>true,
54
+
52
55
  :command=>"sudo docker login --username=#{ENV["CNVRG_IMAGE_BUILD_USERNAME"]} --password=\"#{ENV["CNVRG_IMAGE_BUILD_PASSWORD"]}\""}
53
56
  exit_status, output, errors, _, _ = @executer.execute(command)
54
57
  all_logs = join_logs(output, errors)
@@ -59,7 +62,9 @@ module Cnvrg
59
62
  command = {:type=>"notify",
60
63
  :title=>"docker push",
61
64
  :logs=>true,
62
- :command=>"sudo docker push #{image_data["docker_name"]}"}
65
+ :before_execute_log=>"Pushing docker image",
66
+ :timeout=>3600,
67
+ :command=>"sudo docker push #{image_data["docker_name"]}"}
63
68
  exit_status, output, errors, _, _ = @executer.execute(command)
64
69
  all_logs = join_logs(output, errors)
65
70
  if exit_status > 0
@@ -67,6 +72,7 @@ module Cnvrg
67
72
  end
68
73
  post_build_update(true)
69
74
  rescue => e
75
+ @cli.log_message("Image Build failed")
70
76
  post_build_update(false, e.message)
71
77
  end
72
78
 
data/lib/cnvrg/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Cnvrg
2
- VERSION = '1.5.9.3'
2
+ VERSION = '1.5.9.5'
3
3
  end
4
4
 
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.5.9.3
4
+ version: 1.5.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yochay Ettun
@@ -448,7 +448,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
448
448
  - !ruby/object:Gem::Version
449
449
  version: '0'
450
450
  requirements: []
451
- rubygems_version: 3.0.3
451
+ rubygems_version: 3.0.4
452
452
  signing_key:
453
453
  specification_version: 4
454
454
  summary: A CLI tool for interacting with cnvrg.io.