2018-12-13 13:39:08 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
module Pipeline
|
|
|
|
module Chain
|
|
|
|
class Create < Chain::Base
|
|
|
|
include Chain::Helpers
|
|
|
|
|
|
|
|
def perform!
|
2021-01-03 14:25:43 +05:30
|
|
|
BulkInsertableAssociations.with_bulk_insert do
|
2020-07-28 23:09:34 +05:30
|
|
|
pipeline.save!
|
|
|
|
end
|
2018-03-17 18:26:18 +05:30
|
|
|
rescue ActiveRecord::RecordInvalid => e
|
|
|
|
error("Failed to persist the pipeline: #{e}")
|
|
|
|
end
|
|
|
|
|
|
|
|
def break?
|
|
|
|
!pipeline.persisted?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|