fig-lock 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fig/lock.rb +9 -4
- data/lib/fig/lock/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6082fc690c9c623864c00802f36b94c22d3db828
|
4
|
+
data.tar.gz: 9d237cb409ee76286dfae5f8e2df5ad03cb220d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29f62424d2490aa223548a33a81c130f802cd39271a950a793ec3d1f847c25fddfd8589de8d337af6bac36fd7522c68e46d6ecc1d6e8a70891f88ac6fcf8e95c
|
7
|
+
data.tar.gz: 7d87d6633eb97cd6f2e7c277088308e1a8867798a594371afa0a5f90d7b4af6be34082f132b5cdf602cf3513af618d4caa6ba7b51d97bbf192d93792d0bf388b
|
data/lib/fig/lock.rb
CHANGED
@@ -75,11 +75,10 @@ module Fig
|
|
75
75
|
image = "#{image}:latest" unless image.index(':')
|
76
76
|
log.info "Selecting latest tag for #{image} ..."
|
77
77
|
|
78
|
-
|
79
78
|
unless image.nil?
|
80
79
|
result = resolved_tags[image]
|
81
80
|
if result
|
82
|
-
log.
|
81
|
+
log.debug "Using previously resolved image: #{result}"
|
83
82
|
else
|
84
83
|
# Fetch tags
|
85
84
|
tags = docker_client.tags(image)
|
@@ -88,18 +87,24 @@ module Fig
|
|
88
87
|
|
89
88
|
# Figure out which one corresponds to "latest"
|
90
89
|
version = tags.detect{|k,v|
|
90
|
+
puts "#{k}: #{v}"
|
91
91
|
v == latest && k != 'latest'
|
92
92
|
}
|
93
93
|
version = version[0] if version
|
94
94
|
fail "No matching version found for hash #{latest}" unless version
|
95
95
|
|
96
96
|
result = "#{image[0..image.rindex(':')-1]}:#{version}"
|
97
|
-
log.
|
97
|
+
log.debug "Resolved image: #{result}"
|
98
98
|
resolved_tags[image] = result
|
99
99
|
end
|
100
100
|
|
101
101
|
# Update hash
|
102
|
-
v['image']
|
102
|
+
if v['image'] == result
|
103
|
+
log.info "Component #{k} already using #{result}"
|
104
|
+
else
|
105
|
+
log.info "Component #{k} updated to #{result}"
|
106
|
+
v['image'] = result
|
107
|
+
end
|
103
108
|
end
|
104
109
|
end
|
105
110
|
end
|
data/lib/fig/lock/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fig-lock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Shea
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|