Sha256: 91f20a7e9e21bcefe8587ccfc11ffae80c590476f50e98bdf094ed936954e071

Contents?: true

Size: 656 Bytes

Versions: 3

Compression:

Stored size: 656 Bytes

Contents

require 'fileutils'

class Indocker::ServerPools::BuildServerConnection < Indocker::ServerPools::ServerConnection
  def compile_image_remotely(configuration_name:, image_name:)
    compile_args = @configuration.compile_args ? @configuration.compile_args.map { |k, v| "--compile-arg=\"#{k}=#{v}\"" }.join(" ") : ""

    result = exec!(
      "cd #{Indocker::IndockerHelper.indocker_dir} && ./bin/remote/compile -C #{configuration_name} -i #{image_name} #{compile_args} -s #{@logger.debug? ? '-d' : ''}"
    )

    Indocker::SshResultLogger
      .new(@logger)
      .log(result, "#{image_name.to_s.green} image compilation failed")
    
    result
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
indocker-0.3.9 lib/indocker/server_pools/build_server_connection.rb
indocker-0.3.8 lib/indocker/server_pools/build_server_connection.rb
indocker-0.3.7 lib/indocker/server_pools/build_server_connection.rb