diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-24 15:47:29 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-24 15:47:29 +0300 |
commit | dce706bfcbddf7952e2c42c0c42825044cbb43a2 (patch) | |
tree | df470a3be06659d11eb5b060f7fa3e315604c22b /app | |
parent | d6f37a34c1c262f49a92f26dd187819419d56c2f (diff) |
Do not require a manifest for container repository
Container repository can be empty - no tags or blogs is OK.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/container_repository.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/models/container_repository.rb b/app/models/container_repository.rb index e5076f30c8e..c8c56e69269 100644 --- a/app/models/container_repository.rb +++ b/app/models/container_repository.rb @@ -1,7 +1,6 @@ class ContainerRepository < ActiveRecord::Base belongs_to :project - validates :manifest, presence: true validates :name, length: { minimum: 0, allow_nil: false } delegate :client, to: :registry @@ -43,6 +42,8 @@ class ContainerRepository < ActiveRecord::Base ContainerRegistry::Blob.new(self, config) end + # TODO, add bang to this method + # def delete_tags return unless tags @@ -52,6 +53,14 @@ class ContainerRepository < ActiveRecord::Base end end + # TODO, specs needed + # + def empty? + tags.none? + end + + # TODO, we will return a new ContainerRepository object here + # def self.project_from_path(repository_path) return unless repository_path.include?('/') |