Class: ManageIQ::Floe::Workflow::Runner
- Inherits:
-
Object
- Object
- ManageIQ::Floe::Workflow::Runner
show all
- Includes:
- Logging
- Defined in:
- lib/manageiq/floe/workflow/runner.rb,
lib/manageiq/floe/workflow/runner/docker.rb,
lib/manageiq/floe/workflow/runner/podman.rb,
lib/manageiq/floe/workflow/runner/kubernetes.rb
Defined Under Namespace
Classes: Docker, Kubernetes, Podman
Class Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Logging
included, #logger
Class Attribute Details
.docker_runner_klass ⇒ Object
10
11
12
|
# File 'lib/manageiq/floe/workflow/runner.rb', line 10
def docker_runner_klass
@docker_runner_klass ||= const_get(ENV.fetch("DOCKER_RUNNER", "docker").capitalize)
end
|
Class Method Details
.for_resource(resource) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/manageiq/floe/workflow/runner.rb', line 14
def for_resource(resource)
raise ArgumentError, "resource cannot be nil" if resource.nil?
scheme = resource.split("://").first
case scheme
when "docker"
docker_runner_klass.new
else
raise "Invalid resource scheme [#{scheme}]"
end
end
|
Instance Method Details
#run!(image, env = {}, secrets = {}) ⇒ Object
27
28
29
|
# File 'lib/manageiq/floe/workflow/runner.rb', line 27
def run!(image, env = {}, secrets = {})
raise NotImplementedError, "Must be implemented in a subclass"
end
|