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!
|
2018-12-13 13:39:08 +05:30
|
|
|
pipeline.save!
|
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
|