2018-12-10 08:25:49 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Ci
|
|
|
|
class Bridge < CommitStatus
|
2019-01-22 07:56:06 -05:00
|
|
|
include Ci::Processable
|
2019-03-02 09:29:04 -05:00
|
|
|
include Ci::Contextable
|
2019-04-25 04:23:39 -04:00
|
|
|
include Ci::PipelineDelegator
|
2018-12-10 08:25:49 -05:00
|
|
|
include Importable
|
|
|
|
include AfterCommitQueue
|
2019-03-02 09:00:00 -05:00
|
|
|
include HasRef
|
2018-12-10 08:25:49 -05:00
|
|
|
include Gitlab::Utils::StrongMemoize
|
|
|
|
|
2018-12-12 07:49:42 -05:00
|
|
|
belongs_to :project
|
2019-01-14 07:07:46 -05:00
|
|
|
belongs_to :trigger_request
|
2018-12-10 08:25:49 -05:00
|
|
|
validates :ref, presence: true
|
|
|
|
|
|
|
|
def self.retry(bridge, current_user)
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def tags
|
|
|
|
[:bridge]
|
|
|
|
end
|
|
|
|
|
|
|
|
def detailed_status(current_user)
|
|
|
|
Gitlab::Ci::Status::Bridge::Factory
|
|
|
|
.new(self, current_user)
|
|
|
|
.fabricate!
|
|
|
|
end
|
|
|
|
|
2019-01-22 07:56:06 -05:00
|
|
|
def schedulable?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def action?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def artifacts?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
2019-03-02 09:29:04 -05:00
|
|
|
def runnable?
|
|
|
|
false
|
2019-01-22 07:56:06 -05:00
|
|
|
end
|
|
|
|
|
2019-03-02 09:29:04 -05:00
|
|
|
def expanded_environment_name
|
2018-12-10 08:25:49 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def execute_hooks
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2019-01-22 07:56:06 -05:00
|
|
|
|
|
|
|
def to_partial_path
|
2019-01-22 08:21:48 -05:00
|
|
|
'projects/generic_commit_statuses/generic_commit_status'
|
2019-01-22 07:56:06 -05:00
|
|
|
end
|
2018-12-10 08:25:49 -05:00
|
|
|
end
|
|
|
|
end
|
2019-09-13 09:26:31 -04:00
|
|
|
|
|
|
|
::Ci::Bridge.prepend_if_ee('::EE::Ci::Bridge')
|