2018-11-20 20:47:30 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
# Base class for deployment services
|
|
|
|
#
|
|
|
|
# These services integrate with a deployment solution like Kubernetes/OpenShift,
|
|
|
|
# Mesosphere, etc, to provide additional features to environments.
|
|
|
|
class DeploymentService < Service
|
|
|
|
default_value_for :category, 'deployment'
|
|
|
|
|
|
|
|
def self.supported_events
|
|
|
|
%w()
|
|
|
|
end
|
|
|
|
|
2019-05-30 16:15:17 +05:30
|
|
|
def predefined_variables
|
2017-08-17 22:00:37 +05:30
|
|
|
[]
|
|
|
|
end
|
|
|
|
|
|
|
|
# Environments may have a number of terminals. Should return an array of
|
|
|
|
# hashes describing them, e.g.:
|
|
|
|
#
|
|
|
|
# [{
|
|
|
|
# :selectors => {"a" => "b", "foo" => "bar"},
|
|
|
|
# :url => "wss://external.example.com/exec",
|
|
|
|
# :headers => {"Authorization" => "Token xxx"},
|
|
|
|
# :subprotocols => ["foo"],
|
|
|
|
# :ca_pem => "----BEGIN CERTIFICATE...", # optional
|
|
|
|
# :created_at => Time.now.utc
|
|
|
|
# }]
|
|
|
|
#
|
|
|
|
# Selectors should be a set of values that uniquely identify a particular
|
|
|
|
# terminal
|
|
|
|
def terminals(environment)
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
def can_test?
|
|
|
|
false
|
|
|
|
end
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|