11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/krane/cli/render_command.rb', line 11
def self.from_options(options)
require 'kubernetes-deploy/render_task'
require 'kubernetes-deploy/bindings_parser'
require 'kubernetes-deploy/options_helper'
bindings_parser = KubernetesDeploy::BindingsParser.new
options[:bindings]&.each { |b| bindings_parser.add(b) }
KubernetesDeploy::OptionsHelper.with_processed_template_paths(options[:filenames]) do |paths|
runner = KubernetesDeploy::RenderTask.new(
current_sha: ENV["REVISION"],
template_paths: paths,
bindings: bindings_parser.parse,
)
runner.run!(STDOUT)
end
end
|