Sha256: 68a416b05c7ab1e5bc5c9064d0c6afb09aaad36b7ba7003f9e03bdafde38b255

Contents?: true

Size: 817 Bytes

Versions: 26

Compression:

Stored size: 817 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

build_dir = File.expand_path(ENV["TRAVIS_BUILD_DIR"] || Dir.pwd)

env = { "GEMFILE_MOD" => "gem 'chef', path: '#{build_dir}'" }

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, env: env)
      shell_out!("bundle exec #{ARGV.join(" ")}", live_stream: STDOUT, env: env)
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
chef-14.15.6 tasks/bin/run_external_test
chef-14.15.6-universal-mingw32 tasks/bin/run_external_test
chef-14.14.29 tasks/bin/run_external_test
chef-14.14.29-universal-mingw32 tasks/bin/run_external_test
chef-14.14.25-universal-mingw32 tasks/bin/run_external_test
chef-14.14.25 tasks/bin/run_external_test
chef-14.14.14-universal-mingw32 tasks/bin/run_external_test
chef-14.14.14 tasks/bin/run_external_test
chef-14.13.11 tasks/bin/run_external_test
chef-14.12.9 tasks/bin/run_external_test
chef-14.12.3 tasks/bin/run_external_test
chef-14.11.21 tasks/bin/run_external_test
chef-14.10.9 tasks/bin/run_external_test
chef-14.9.13 tasks/bin/run_external_test
chef-14.8.12 tasks/bin/run_external_test
chef-14.7.17 tasks/bin/run_external_test
chef-14.6.47 tasks/bin/run_external_test
chef-14.5.33 tasks/bin/run_external_test
chef-14.5.27 tasks/bin/run_external_test
chef-14.5.27-universal-mingw32 tasks/bin/run_external_test