summaryrefslogtreecommitdiff
path: root/lib/container_registry
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-12 13:03:04 -0500
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-12 13:03:04 -0500
commit5c2f2fd2890b7efd7a63f9a371b2f795f2e9fa43 (patch)
tree473a1f9f2fc6c9d33a968218338815e2d84479af /lib/container_registry
parent4d84ba43d8db6a205e79dd8cf723be7ceebf6925 (diff)
downloadgitlab-ce-5c2f2fd2890b7efd7a63f9a371b2f795f2e9fa43.tar.gz
Fix CI tests
Diffstat (limited to 'lib/container_registry')
-rw-r--r--lib/container_registry/client.rb2
-rw-r--r--lib/container_registry/repository.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/container_registry/client.rb b/lib/container_registry/client.rb
index 0bfb6baffd4..c250a4b6946 100644
--- a/lib/container_registry/client.rb
+++ b/lib/container_registry/client.rb
@@ -55,7 +55,7 @@ module ContainerRegistry
conn.request :json
conn.headers['Accept'] = MANIFEST_VERSION
- conn.response :json, :content_type => /\bjson$/
+ conn.response :json, content_type: /\bjson$/
if options[:user] && options[:password]
conn.request(:basic_auth, options[:user].to_s, options[:password].to_s)
diff --git a/lib/container_registry/repository.rb b/lib/container_registry/repository.rb
index f01330f3648..b30cb527b60 100644
--- a/lib/container_registry/repository.rb
+++ b/lib/container_registry/repository.rb
@@ -30,19 +30,21 @@ module ContainerRegistry
def tags
return @tags if defined?(@tags)
return [] unless manifest && manifest['tags']
+
@tags = manifest['tags'].map do |tag|
ContainerRegistry::Tag.new(self, tag)
end
- @tags ||= []
end
def delete_tags
return unless tags
+
tags.each(:delete)
end
def mount_blob(blob)
return unless blob
+
client.repository_mount_blob(name, blob.digest, blob.repository.name)
end