class Litterbox::Habitat::Export
Habitat
upload
Public Class Methods
new(pkg, exporter = 'docker')
click to toggle source
# File lib/litterbox/habitat/export.rb, line 7 def initialize(pkg, exporter = 'docker') @pkg = pkg @exporter = exporter end
Public Instance Methods
upload(pkg = @pkg, exporter = @exporter)
click to toggle source
# File lib/litterbox/habitat/export.rb, line 12 def upload(pkg = @pkg, exporter = @exporter) raise 'file artifact not found' unless File.exist?(pkg) Open3.popen3("hab pkg export #{exporter} #{pkg}") do |_, out, _, thr| while (line = out.gets) puts(line) end return thr.value end end