cnvrg 1.5.9.7 → 1.5.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6cd8487e9d134f4a4540880ea609d2cec9502c232645d1488b5570f632da72da
4
- data.tar.gz: 396ba0a587e23ea2abe7e521f3c785ea0eb6d020d8abd57efdf7fc07ff196538
3
+ metadata.gz: 80cea7cb72fe2519aa96ceea39d1ed127985dd7592b659608eceb5a8b459ff8c
4
+ data.tar.gz: 25614f2ff198c984c3aec669eff594b9319b652f2fd916f42198d7c5a6413791
5
5
  SHA512:
6
- metadata.gz: 6f5bb69eb58019c3f3024825611f13bfcc369e22c278ef1d3bc20861db40cdb6842a5754e2d3d8feb47e9de8dad5a795a076b7fcc40297f70a038a825c6db8e0
7
- data.tar.gz: ec6ef848299848cab9bab9f067bc45a441c2407d8f890a9c4ff32ae87f010e10f9c9f3068eff0775aa9e72cd3490e2c8733637d64342b4e0dd32688a9b7b2842
6
+ metadata.gz: a82a8d182742a92f0b3a3139c4bfbd766fd714bc487dc8b15077e6a5bef1e60d13888da783ece532613777a9b7b965e15728af4d0e32b27e1543d2ff46d6141d
7
+ data.tar.gz: 44ad16320b0e8ad5b6c768c011dcedc051e8c4f1faf0d9c62987cb09a8688f5fcf601cdab301aadf47eb4185a42547a502ddceb832fa8533635d007cd09c1d26
@@ -33,26 +33,37 @@ module Cnvrg
33
33
  file << open(image_data["docker_file_path"]).read
34
34
  end
35
35
  end
36
- command = {:type=>"notify",
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 #{image_data["docker_name"]} -f #{file_name}"}
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
- :command=>"sudo docker login --username=#{ENV["CNVRG_IMAGE_BUILD_USERNAME"]} --password=\"#{ENV["CNVRG_IMAGE_BUILD_PASSWORD"]}\""}
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
@@ -1,4 +1,4 @@
1
1
  module Cnvrg
2
- VERSION = '1.5.9.7'
2
+ VERSION = '1.5.9.8'
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.7
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-24 00:00:00.000000000 Z
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.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.