Make CI/CD bridge job a pipeline processable entity
This commit is contained in:
parent
76e7b19c81
commit
20e7d4882c
3 changed files with 43 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
module Ci
|
||||
class Bridge < CommitStatus
|
||||
include Ci::Processable
|
||||
include Importable
|
||||
include AfterCommitQueue
|
||||
include Gitlab::Utils::StrongMemoize
|
||||
|
@ -24,6 +25,21 @@ module Ci
|
|||
.fabricate!
|
||||
end
|
||||
|
||||
def schedulable?
|
||||
false
|
||||
end
|
||||
|
||||
def action?
|
||||
false
|
||||
end
|
||||
|
||||
def artifacts?
|
||||
false
|
||||
end
|
||||
|
||||
def expanded_environment_name
|
||||
end
|
||||
|
||||
def predefined_variables
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
@ -31,5 +47,9 @@ module Ci
|
|||
def execute_hooks
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
||||
def to_partial_path
|
||||
'projects/ci/builds/build'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
23
app/presenters/ci/bridge_presenter.rb
Normal file
23
app/presenters/ci/bridge_presenter.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Ci
|
||||
class BridgePresenter < CommitStatusPresenter
|
||||
def status_title
|
||||
tooltip_for_badge
|
||||
end
|
||||
|
||||
def tooltip_message
|
||||
"#{subject.name} - #{detailed_status.status_tooltip}"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def tooltip_for_badge
|
||||
detailed_status.badge_tooltip.capitalize
|
||||
end
|
||||
|
||||
def detailed_status
|
||||
@detailed_status ||= subject.detailed_status(user)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -18,7 +18,6 @@ module Gitlab
|
|||
end
|
||||
|
||||
def details_path
|
||||
raise NotImplementedError
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue