diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-08-02 16:32:52 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-08-02 18:41:40 +0200 |
commit | 684751d3c2233ee1ac33cf623e8b7822c60209d3 (patch) | |
tree | 5696d3f3e6a99a806ff185f3d9c11c22e50db92c /app/models | |
parent | 8156e77c1a25bc6050e5036fa3bbfd29201a6d5c (diff) | |
download | gitlab-ce-684751d3c2233ee1ac33cf623e8b7822c60209d3.tar.gz |
Make needs: to require previous jobsmake-needs-strong-connection
This changes `needs:` from weak reference
to have a strong reference.
This means that job will not be created
unless all needs are present as part of
a pipeline.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/pipeline.rb | 5 |
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?) |