dapp 0.35.1 → 0.35.2

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: 4d582445e85c5fb764f8550bd9af362b24a8052501703361ff74e173d3331a5c
4
- data.tar.gz: 1cf1ee08368dc4d5462a77b5f7b654550033464cad4bfd5dea186415a5cdb5f5
3
+ metadata.gz: ce13ee52e8b38605ea29d963d0d8c220c6ca3f8c459aa8984842afaa142fd9f1
4
+ data.tar.gz: 2808f4c2d775a040dfb1d07aea2720949e8fadb7bc5fe10848e8d295d38d61b9
5
5
  SHA512:
6
- metadata.gz: 3dbdde8c67331bdcac234990fa4b83db2345d109372617fd8645adfb6b03e6eecba095340088424bb9490310e1c7541be73047d28935c847652b28d7133bf178
7
- data.tar.gz: 48dca1e28cb796911dde4956287bf01dd95f13f20ea6f281be4320297bf5d1f6457fbb65c57b74fca73f3ec561b74efd74e1af1cbc363a96737a98ffaef7a994
6
+ metadata.gz: e78f71c1ee42bb59ac9629739519d7a3e6041d50145572eff8adc7ac710a0174a69c3e7c52f88f8b186754d67b662c8a1c900766e7c61852d4b8332a0add9b7b
7
+ data.tar.gz: 0b140d2780f3f6cc5a2951790eee0ed48f93a0d773373715aa51fe57cb98ffa98ba24a1a1202b4b86b5958a4795e86b773f9dbe0f527f9e656eb6fd58f18d60a
@@ -36,6 +36,8 @@ module Dapp
36
36
 
37
37
  include Shellout::Base
38
38
 
39
+ GCR_REGISTRIES = %w(asia.gcr.io eu.gcr.io gcr.io marketplace.gcr.io staging-k8s.gcr.io us.gcr.io)
40
+
39
41
  attr_reader :options
40
42
 
41
43
  def get_ruby2go_state_hash
@@ -56,6 +58,7 @@ module Dapp
56
58
 
57
59
  ruby2go_init
58
60
 
61
+ setup_ssh_agent
59
62
  try_host_docker_login
60
63
  end
61
64
 
@@ -242,11 +245,16 @@ module Dapp
242
245
  if options[:registry_username] && options[:registry_password]
243
246
  [options[:registry_username], options[:registry_password]]
244
247
  elsif ENV.key?('DAPP_DOCKER_CONFIG')
245
- elsif !ENV.key?('DAPP_IGNORE_CI_DOCKER_AUTOLOGIN') && ENV.key?('CI_JOB_TOKEN')
248
+ elsif !gcr_registry? && !ENV.key?('DAPP_IGNORE_CI_DOCKER_AUTOLOGIN') && ENV.key?('CI_JOB_TOKEN')
246
249
  ['gitlab-ci-token', ENV['CI_JOB_TOKEN']]
247
250
  end
248
251
  end
249
252
 
253
+ def gcr_registry?
254
+ return false if options[:repo].nil?
255
+ GCR_REGISTRIES.any? { |registry| options[:repo].to_s.start_with?(registry) }
256
+ end
257
+
250
258
  def host_docker_tmp_config_dir
251
259
  @host_docker_tmp_config_dir ||= Dir.mktmpdir('dapp-', tmp_base_dir)
252
260
  end
@@ -4,8 +4,6 @@ module Dapp
4
4
  module Command
5
5
  module Build
6
6
  def build
7
- setup_ssh_agent
8
-
9
7
  build_configs.each do |config|
10
8
  log_dimg_name_with_indent(config) do
11
9
  dimg(config: config).build!
@@ -5,7 +5,6 @@ module Dapp
5
5
  module Run
6
6
  def run(stage_name, docker_options, command)
7
7
  one_dimg!
8
- setup_ssh_agent
9
8
  dimg(config: build_configs.first, should_be_built: stage_name.nil?, ignore_signature_auto_calculation: true)
10
9
  .run_stage(stage_name, docker_options, command)
11
10
  end
@@ -1,4 +1,4 @@
1
1
  module Dapp
2
- VERSION = "0.35.1"
2
+ VERSION = "0.35.2"
3
3
  BUILD_CACHE_VERSION = 31
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.1
4
+ version: 0.35.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Stolyarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-13 00:00:00.000000000 Z
11
+ date: 2018-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout