Class: Gitlab::Ci::Pipeline::Chain::SeedBlock

Inherits:
Base
  • Object
show all
Includes:
Helpers, Utils::StrongMemoize
Defined in:
lib/gitlab/ci/pipeline/chain/seed_block.rb

Instance Attribute Summary

Attributes inherited from Base

#command, #config, #pipeline

Instance Method Summary collapse

Methods included from Helpers

#error, #warning

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Gitlab::Ci::Pipeline::Chain::Base

Instance Method Details

#break?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/gitlab/ci/pipeline/chain/seed_block.rb', line 20

def break?
  pipeline.errors.any?
end

#perform!Object



11
12
13
14
15
16
17
18
# File 'lib/gitlab/ci/pipeline/chain/seed_block.rb', line 11

def perform!
  ##
  # Populate pipeline with block argument of CreatePipelineService#execute.
  #
  @command.seeds_block&.call(pipeline)

  raise "Pipeline cannot be persisted by `seeds_block`" if pipeline.persisted?
end