Class: Barbeque::Runner::Hako
- Inherits:
-
Object
- Object
- Barbeque::Runner::Hako
- Defined in:
- lib/barbeque/runner/hako.rb
Instance Method Summary collapse
-
#initialize(docker_image:, hako_dir:, hako_env: {}, yaml_dir:) ⇒ Hako
constructor
A new instance of Hako.
- #run(command, envs) ⇒ String, Process::Status
Constructor Details
#initialize(docker_image:, hako_dir:, hako_env: {}, yaml_dir:) ⇒ Hako
Returns a new instance of Hako.
10 11 12 13 14 15 16 |
# File 'lib/barbeque/runner/hako.rb', line 10 def initialize(docker_image:, hako_dir:, hako_env: {}, yaml_dir:) @app_name = docker_image.repository @tag = docker_image.tag @hako_dir = hako_dir @hako_env = hako_env @yaml_dir = yaml_dir end |
Instance Method Details
#run(command, envs) ⇒ String, Process::Status
23 24 25 26 27 28 |
# File 'lib/barbeque/runner/hako.rb', line 23 def run(command, envs) cmd = build_hako_oneshot_command(command, envs) Bundler.with_clean_env do Open3.capture3(@hako_env, *cmd, chdir: @hako_dir) end end |