Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-08-02 21:48:52 +0300
committerSean McGivern <sean@gitlab.com>2019-08-02 21:48:52 +0300
commitc7de5403bdd5513ad233341cc3de4b0809304e63 (patch)
tree09050d541ddd44bf61f70a2bfd6462c1aaf8cac9 /app/models
parentea22989e527dd0ae4d9024c21400cb15646d8423 (diff)
parent684751d3c2233ee1ac33cf623e8b7822c60209d3 (diff)
Merge branch 'make-needs-strong-connection' into 'master'
Make `needs:` to require a strong reference Closes #65512 See merge request gitlab-org/gitlab-ce!31419
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/pipeline.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 3515f0b83ee..ffab4e82f90 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -504,8 +504,9 @@ module Ci
return [] unless config_processor
strong_memoize(:stage_seeds) do
- seeds = config_processor.stages_attributes.map do |attributes|
- Gitlab::Ci::Pipeline::Seed::Stage.new(self, attributes)
+ seeds = config_processor.stages_attributes.inject([]) do |previous_stages, attributes|
+ seed = Gitlab::Ci::Pipeline::Seed::Stage.new(self, attributes, previous_stages)
+ previous_stages + [seed]
end
seeds.select(&:included?)