Class: Gitlab::Ci::Pipeline::Chain::Create
- Includes:
 - Helpers, Utils::StrongMemoize
 
- Defined in:
 - lib/gitlab/ci/pipeline/chain/create.rb
 
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods included from Helpers
Methods inherited from Base
Constructor Details
This class inherits a constructor from Gitlab::Ci::Pipeline::Chain::Base
Instance Method Details
#break? ⇒ Boolean
      35 36 37  | 
    
      # File 'lib/gitlab/ci/pipeline/chain/create.rb', line 35 def break? !pipeline.persisted? end  | 
  
#perform! ⇒ Object
      11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33  | 
    
      # File 'lib/gitlab/ci/pipeline/chain/create.rb', line 11 def perform! logger.instrument_once_with_sql(:pipeline_save) do # It is still fine to save `::Ci::JobDefinition` objects even if the pipeline is not created due to some # reason because they can be used in the next pipeline creations. ::Gitlab::Ci::Pipeline::Create::JobDefinitionBuilder.new(pipeline, statuses).run BulkInsertableAssociations.with_bulk_insert do ::Ci::BulkInsertableTags. do pipeline.transaction do pipeline.save! Gitlab::Ci::Tags::BulkInsert.(taggable_statuses) end end end end rescue ActiveRecord::RecordInvalid => e error("Failed to persist the pipeline: #{e}") rescue ActiveRecord::RecordNotUnique => e raise unless e..include?('iid') ::InternalId.flush_records!(project: project, usage: :ci_pipelines) error("Failed to persist the pipeline, please retry") end  |