Do not select included stage seeds in populate chain

This commit is contained in:
Grzegorz Bizon 2018-03-22 14:10:16 +01:00
parent 000f9d01f7
commit 109ecf6f07

View file

@ -9,19 +9,16 @@ module Gitlab
def perform!
##
# Populate pipeline with block `CreatePipelineService#execute`.
# Populate pipeline with block argument of CreatePipelineService#execute.
#
@command.seeds_block&.call(pipeline)
##
# Populate pipeline with all stages and builds.
# Populate pipeline with all stages and builds from pipeline seeds.
#
pipeline.stage_seeds.each do |seed|
seed.user = current_user
# TODO, this needs specs, no test coverage
next unless seed.included?
pipeline.stages << seed.to_resource
end