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 +4 -4
- data/lib/cnvrg/helpers/executer.rb +1 -1
- data/lib/cnvrg/image.rb +9 -3
- data/lib/cnvrg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1038150f013eb708622bf134d1cb94e8c861fe5ef6ca0d545d7c641f78fa4dd0
|
4
|
+
data.tar.gz: 97b7028be08f49a1d391af78bd2be2f8ffc136f410b1a9e5065a2d4a819ee15c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fd3a2219fc4a362be0b6cf22f50e4bba86f7b98f344ec1ff57302bde94de59394a12aa4717221d17571727381ed93218b05cca4f0c074d1fcbde2fcff0f44af
|
7
|
+
data.tar.gz: d017620576ab73330cd3f694c3008aa846d6212a3c31b44ab10027b585c78a047fe701ac8c83114fb2130642c67668f80906af9be2231b989dfec70a48be5605
|
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
|
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
|
-
|
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
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.
|
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.
|
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.
|