cnvrg 1.5.9.7 → 1.5.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cnvrg/image.rb +16 -5
- data/lib/cnvrg/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80cea7cb72fe2519aa96ceea39d1ed127985dd7592b659608eceb5a8b459ff8c
|
4
|
+
data.tar.gz: 25614f2ff198c984c3aec669eff594b9319b652f2fd916f42198d7c5a6413791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a82a8d182742a92f0b3a3139c4bfbd766fd714bc487dc8b15077e6a5bef1e60d13888da783ece532613777a9b7b965e15728af4d0e32b27e1543d2ff46d6141d
|
7
|
+
data.tar.gz: 44ad16320b0e8ad5b6c768c011dcedc051e8c4f1faf0d9c62987cb09a8688f5fcf601cdab301aadf47eb4185a42547a502ddceb832fa8533635d007cd09c1d26
|
data/lib/cnvrg/image.rb
CHANGED
@@ -33,26 +33,37 @@ module Cnvrg
|
|
33
33
|
file << open(image_data["docker_file_path"]).read
|
34
34
|
end
|
35
35
|
end
|
36
|
-
|
36
|
+
if ENV["CNVRG_IMAGE_BUILD_REGISTRY"].present?
|
37
|
+
docker_url = "#{ENV["CNVRG_IMAGE_BUILD_REGISTRY"]}/#{image_data["docker_name"]}"
|
38
|
+
else
|
39
|
+
docker_url = "#{image_data["docker_name"]}"
|
40
|
+
end
|
41
|
+
command = {:type=>"notify",
|
37
42
|
:title=>"docker build",
|
38
43
|
:logs=>true,
|
39
44
|
:before_execute_log=>"Building docker image",
|
40
45
|
:timeout=>3600,
|
41
|
-
:command=>"sudo docker build . -t #{
|
46
|
+
:command=>"sudo docker build . -t #{docker_url} -f #{file_name}"}
|
42
47
|
@executer = Helpers::Executer.new(project: @project, job_type: "image", job_id: @image_id, image: self)
|
43
48
|
exit_status, output, errors, _, _ = @executer.execute(command)
|
44
49
|
all_logs = join_logs(output, errors)
|
45
50
|
if exit_status != 0
|
46
51
|
raise StandardError.new(all_logs)
|
47
52
|
end
|
48
|
-
|
49
53
|
if ENV["CNVRG_IMAGE_BUILD_USERNAME"].present? and ENV["CNVRG_IMAGE_BUILD_PASSWORD"].present?
|
54
|
+
if ENV["CNVRG_IMAGE_BUILD_REGISTRY"].present?
|
50
55
|
command = {:type=>"notify",
|
51
56
|
:no_stdout => true,
|
52
57
|
:title=>"docker login",
|
53
58
|
:logs=>true,
|
54
|
-
|
55
|
-
|
59
|
+
:command=>"sudo docker login #{ENV["CNVRG_IMAGE_BUILD_REGISTRY"]} --username=#{ENV["CNVRG_IMAGE_BUILD_USERNAME"]} --password=\"#{ENV["CNVRG_IMAGE_BUILD_PASSWORD"]}\""}
|
60
|
+
else
|
61
|
+
command = {:type=>"notify",
|
62
|
+
:no_stdout => true,
|
63
|
+
:title=>"docker login",
|
64
|
+
:logs=>true,
|
65
|
+
:command=>"sudo docker login --username=#{ENV["CNVRG_IMAGE_BUILD_USERNAME"]} --password=\"#{ENV["CNVRG_IMAGE_BUILD_PASSWORD"]}\""}
|
66
|
+
end
|
56
67
|
exit_status, output, errors, _, _ = @executer.execute(command)
|
57
68
|
all_logs = join_logs(output, errors)
|
58
69
|
if exit_status != 0
|
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.8
|
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-10-
|
13
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -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.
|