diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-03-22 15:57:39 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-03-22 16:04:53 +0300 |
commit | 000f9d01f7a8c6eb20c16927f95a2e3de42bc283 (patch) | |
tree | 6a9a13e732bd2e91cda53d619e112c53ee1164fe /app/models/ci/pipeline.rb | |
parent | 0e51842dcaa1ed5ff7fc62b02fa88b47b12b9b76 (diff) |
Decouple YAML processor from pipeline objects
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r-- | app/models/ci/pipeline.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index bac5b3860e4..acc2dbb59fd 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -362,7 +362,13 @@ module Ci def stage_seeds return [] unless config_processor - @stage_seeds ||= config_processor.stage_seeds(self) + strong_memoize(:stage_seeds) do + seeds = config_processor.stages.map do |attributes| + Gitlab::Ci::Pipeline::Seed::Stage.new(self, attributes) + end + + seeds.select(&:included?) + end end def has_kubernetes_active? |