blubber 0.1.6 → 0.1.7

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: 457810ff6394abec0c13d9f0116d72a567cc0bf2d71e0f05aca667b4e2e35c09
4
- data.tar.gz: 04b89a2313b751e77cd9c5378aa3d67d1793c4be1099c0a5b35b0355b9846750
3
+ metadata.gz: 2cc2529467b08e92f4e04567459d8a152b335a3797188311e45e1ba34bfd61d6
4
+ data.tar.gz: 68ef0d40ca4b6c3f60fcf248ab678afffb36b9fa2483d152f8fe73f991780147
5
5
  SHA512:
6
- metadata.gz: 934b188004e2822626a83f393cd035188c4d2fb22c5f5b06f441ea4b004fe2a1806bff6d987423fb6c79298622f0274faf872c83557578c544dac8bb7e2cb019
7
- data.tar.gz: e8b817c7d36fd1eddc2d97c9c60106784021d9b060f88ed1e24f94839c99d8cc896400aa5cc19d71b98b86e56b30250b33580bf7698c9bffad0c01c14d0dbb0a
6
+ metadata.gz: f0bf51318929ad63feb8cb0382339ac6290fd432d09b26077121b24b268ccb62e0dfad89a8421502cadbd4197b658f48db83cd4a98f0cd57e279bbe36a42439c
7
+ data.tar.gz: 1dcd4ff684e71ad4a5f03311d1e5f9d40b445b9f3b713751016342a2c69b1006f919cc75873f55c8174e36af0d98c94743895dbb3374c7df80f8bbebd33ef4e1
@@ -26,12 +26,6 @@ module Blubber
26
26
 
27
27
  attr_reader :layer, :logger
28
28
 
29
- def docker_registry
30
- format('%<host>s/%<project>s',
31
- host: ENV.fetch('DOCKER_REGISTRY'),
32
- project: 'etl')
33
- end
34
-
35
29
  def ui
36
30
  @ui ||= HighLine.new
37
31
  end
@@ -40,8 +34,8 @@ module Blubber
40
34
  @runner ||= Runner.new(logger: logger)
41
35
  end
42
36
 
43
- def tags
44
- @tags ||= Tagger.new(layer: layer, image_id: nil).tags
37
+ def tagger
38
+ @tagger ||= Tagger.layer(:layer, image_id: nil)
45
39
  end
46
40
 
47
41
  def build_ids
@@ -50,8 +44,8 @@ module Blubber
50
44
 
51
45
  def build(layer)
52
46
  # NOTICE : Speed up build for fresh slave
53
- tags.each do |tag|
54
- runner.run("docker pull #{docker_registry}/#{layer}:#{tag}")
47
+ tagger.tags.each do |tag|
48
+ runner.run("docker pull #{tagger.docker_registry}/#{layer}:#{tag}")
55
49
  end
56
50
 
57
51
  status = nil
@@ -6,6 +6,10 @@ require 'blubber/runner'
6
6
 
7
7
  module Blubber
8
8
  class Tagger
9
+ def self.docker_registry
10
+ ENV.fetch('DOCKER_REGISTRY')
11
+ end
12
+
9
13
  def initialize(layer:, image_id:, logger: nil)
10
14
  @layer = layer
11
15
  @image_id = image_id
@@ -19,7 +23,7 @@ module Blubber
19
23
  end
20
24
 
21
25
  def project
22
- "#{docker_registry}/#{layer}"
26
+ "#{Tagger.docker_registry}/#{layer}"
23
27
  end
24
28
 
25
29
  def tags
@@ -46,10 +50,6 @@ module Blubber
46
50
  @runner ||= Runner.new(logger: logger)
47
51
  end
48
52
 
49
- def docker_registry
50
- ENV.fetch('DOCKER_REGISTRY')
51
- end
52
-
53
53
  def ui
54
54
  @ui ||= HighLine.new
55
55
  end
@@ -1,3 +1,3 @@
1
1
  module Blubber
2
- VERSION = '0.1.6'.freeze
2
+ VERSION = '0.1.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blubber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikko Kokkonen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-12 00:00:00.000000000 Z
11
+ date: 2018-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline