23 lines
446 B
Ruby
23 lines
446 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module Ci
|
|
module Pipeline
|
|
module Chain
|
|
class Create < Chain::Base
|
|
include Chain::Helpers
|
|
|
|
def perform!
|
|
pipeline.save!
|
|
rescue ActiveRecord::RecordInvalid => e
|
|
error("Failed to persist the pipeline: #{e}")
|
|
end
|
|
|
|
def break?
|
|
!pipeline.persisted?
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|