module Dapp::Kube::Dapp::Command::Render
Public Instance Methods
kube_render()
click to toggle source
# File lib/dapp/kube/dapp/command/render.rb, line 6 def kube_render command = "render" # TODO: move project dir logic to golang project_dir = path.to_s dimgs = self.build_configs.map do |config| {"Name" => config._name, "ImageTag" => "DOCKER_TAG", "Repo" => "REPO"} end.uniq do |dimg| dimg["Name"] end res = ruby2go_deploy( "command" => command, "projectDir" => project_dir, "rubyCliOptions" => JSON.dump(self.options), "dimgs" => JSON.dump(dimgs), ) raise ::Dapp::Error::Command, code: :ruby2go_deploy_command_failed, data: { command: command, message: res["error"] } unless res["error"].nil? end
kube_render_old()
click to toggle source
# File lib/dapp/kube/dapp/command/render.rb, line 28 def kube_render_old helm_release do |release| templates = begin if options[:templates].any? release.templates.select do |template_path, _| options[:templates].map { |t| "#{t}*" }.any? do |template_path_pattern| template_path_without_chart_name = template_path[/.*?\/(.*)/, 1] template_relative_path_pattern = Pathname(File.expand_path(template_path_pattern)).subpath_of(path('.helm')) template_relative_path_pattern ||= template_path_pattern File.fnmatch?(template_relative_path_pattern, template_path_without_chart_name, File::FNM_PATHNAME|File::FNM_DOTMATCH) || File.fnmatch?(template_relative_path_pattern, template_path, File::FNM_PATHNAME|File::FNM_DOTMATCH) end end else release.templates end end templates.values.each { |t| puts t } end end