Sha256: 644a1bcc06a10f61785da5177a7cc0d5ba4d77df12b03d70942203fb1d3a6895

Contents?: true

Size: 668 Bytes

Versions: 31

Compression:

Stored size: 668 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift(File.expand_path("../../lib", File.dirname(__FILE__)))

require "tmpdir"
require "bundler"
require "chef/mixin/shell_out"

include Chef::Mixin::ShellOut

github_repo = ARGV.shift
git_thing = ARGV.shift

Dir.mktmpdir("chef-external-test") do |dir|
  git_url = "https://github.com/#{github_repo}"
  Dir.rmdir dir
  shell_out!("git clone #{git_url} #{dir}", live_stream: STDOUT)
  Dir.chdir(dir) do
    shell_out!("git checkout #{git_thing}", live_stream: STDOUT)
    Bundler.with_clean_env do
      shell_out!("bundle install", live_stream: STDOUT)
      shell_out!("bundle exec #{ARGV.join(" ")}", live_stream: STDOUT)
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
chef-13.12.14 tasks/bin/run_external_test
chef-13.12.3 tasks/bin/run_external_test
chef-13.11.3 tasks/bin/run_external_test
chef-13.10.4 tasks/bin/run_external_test
chef-13.10.0 tasks/bin/run_external_test
chef-13.9.4 tasks/bin/run_external_test
chef-13.9.1 tasks/bin/run_external_test
chef-14.0.202-universal-mingw32 tasks/bin/run_external_test
chef-14.0.202 tasks/bin/run_external_test
chef-14.0.190 tasks/bin/run_external_test
chef-13.8.5 tasks/bin/run_external_test
chef-13.8.3 tasks/bin/run_external_test
chef-13.8.0 tasks/bin/run_external_test
chef-13.7.16-universal-mingw32 tasks/bin/run_external_test
chef-13.7.16 tasks/bin/run_external_test
chef-13.6.4-universal-mingw32 tasks/bin/run_external_test
chef-13.6.4 tasks/bin/run_external_test
chef-13.6.0-universal-mingw32 tasks/bin/run_external_test
chef-13.6.0 tasks/bin/run_external_test
chef-13.5.3-universal-mingw32 tasks/bin/run_external_test