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
31 32 33 |
# File 'lib/gitlab/ci/pipeline/chain/create.rb', line 31 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 |
# File 'lib/gitlab/ci/pipeline/chain/create.rb', line 11 def perform! logger.instrument_once_with_sql(:pipeline_save) do BulkInsertableAssociations.with_bulk_insert do ::Ci::BulkInsertableTags. do pipeline.transaction do pipeline.save! Gitlab::Ci::Tags::BulkInsert.(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 |