summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-10 12:57:19 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-10 12:57:19 +0200
commit5fbeb73a76ca21db02146a7686dc13a7c961cc87 (patch)
tree6fdea49e075c301c18010769bd35868c30a37517 /app/models
parent3d1cade13f61115b63bf6dbda5a1f194ba54b24b (diff)
downloadgitlab-ce-5fbeb73a76ca21db02146a7686dc13a7c961cc87.tar.gz
Add method that returns a registry repository location
Diffstat (limited to 'app/models')
-rw-r--r--app/models/container_repository.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/container_repository.rb b/app/models/container_repository.rb
index 9682df3a586..82f4182d59a 100644
--- a/app/models/container_repository.rb
+++ b/app/models/container_repository.rb
@@ -23,6 +23,10 @@ class ContainerRepository < ActiveRecord::Base
@path ||= [project.full_path, name].select(&:present?).join('/')
end
+ def location
+ File.join(registry.path, path)
+ end
+
def tag(tag)
ContainerRegistry::Tag.new(self, tag)
end