Implement pipeline seeds size methods

This commit is contained in:
Grzegorz Bizon 2017-09-28 12:28:26 +02:00
parent 1ca4f282a4
commit d3762c2247
2 changed files with 6 additions and 0 deletions

View file

@ -312,6 +312,10 @@ module Ci
@stage_seeds ||= config_processor.stage_seeds(self)
end
def seeds_size
@seeds_size ||= stage_seeds.sum(&:size)
end
def has_kubernetes_active?
project.kubernetes_service&.active?
end

View file

@ -3,7 +3,9 @@ module Gitlab
module Stage
class Seed
attr_reader :pipeline
delegate :project, to: :pipeline
delegate :size, to: :@jobs
def initialize(pipeline, stage, jobs)
@pipeline = pipeline