debian-mirror-gitlab/app/models/ci/bridge.rb

61 lines
1 KiB
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
module Ci
class Bridge < CommitStatus
2019-03-02 22:35:43 +05:30
include Ci::Processable
2019-07-07 11:18:12 +05:30
include Ci::Contextable
include Ci::PipelineDelegator
2019-02-15 15:39:39 +05:30
include Importable
include AfterCommitQueue
2019-07-07 11:18:12 +05:30
include HasRef
2019-02-15 15:39:39 +05:30
include Gitlab::Utils::StrongMemoize
belongs_to :project
2019-03-02 22:35:43 +05:30
belongs_to :trigger_request
2019-02-15 15:39:39 +05:30
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-03-02 22:35:43 +05:30
def schedulable?
false
end
def action?
false
end
def artifacts?
false
end
2019-07-07 11:18:12 +05:30
def runnable?
false
2019-03-02 22:35:43 +05:30
end
2019-07-07 11:18:12 +05:30
def expanded_environment_name
2019-02-15 15:39:39 +05:30
end
def execute_hooks
raise NotImplementedError
end
2019-03-02 22:35:43 +05:30
def to_partial_path
'projects/generic_commit_statuses/generic_commit_status'
end
2019-02-15 15:39:39 +05:30
end
end
2019-12-04 20:38:33 +05:30
::Ci::Bridge.prepend_if_ee('::EE::Ci::Bridge')