diff --git a/.travis.yml b/.travis.yml index 4062c389d..c15cf786b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,3 +29,12 @@ jobs: - bundle exec rake litmus:install_gems script: - bundle exec rake litmus:acceptance:parallel + - bundler_args: "" + rvm: 2.7 + before_script: + - bundle exec rake 'litmus:provision[docker, centos:7]' + - bundle exec rake 'litmus:install_agent[puppet7]' + - bundle exec rake 'litmus:install_modules_from_directory[./spec/fixtures/acceptance/modules]' + - bundle exec rake litmus:install_gems + script: + - bundle exec rake litmus:acceptance:parallel diff --git a/Rakefile b/Rakefile index 3cfe0a724..9d3c05ec1 100644 --- a/Rakefile +++ b/Rakefile @@ -70,13 +70,26 @@ namespace :litmus do result = run_command(install_command, target_nodes, config: nil, inventory: inventory_hash) if result.is_a?(Array) result.each do |node| - puts "#{node['node']} failed #{node['result']}" if node['status'] != 'success' + puts "#{node['target']} failed: '#{node['value']}'" if node['status'] != 'success' end else raise "Failed trying to run '#{install_command}' against inventory." end end + def install_build_tools(target_nodes, inventory_hash) + puts 'Installing build tools...' + install_build_command = "yum -y group install 'Development Tools'" + result = run_command(install_build_command, target_nodes, config: nil, inventory: inventory_hash) + if result.is_a?(Array) + result.each do |node| + puts "#{node['target']} failed: '#{node['value']}'" if node['status'] != 'success' + end + else + raise "Failed trying to run '#{install_build_command}' against inventory." + end + end + # Install the gem under test and required fixture on a collection of nodes # # @param :target_node_name [Array] nodes on which to install a puppet module for testing. @@ -92,11 +105,11 @@ namespace :litmus do include BoltSpec::Run # Build the gem + puts 'Building gem...' `gem build puppet-strings.gemspec --quiet` result = $CHILD_STATUS raise "Unable to build the puppet-strings gem. Returned exit code #{result.exitstatus}" unless result.exitstatus.zero? - puts 'Built' # Find the gem build artifact gem_tar = Dir.glob('puppet-strings-*.gem').max_by { |f| File.mtime(f) } raise "Unable to find package in 'puppet-strings-*.gem'" if gem_tar.nil? @@ -111,6 +124,8 @@ namespace :litmus do puts 'Copying gem to targets...' upload_file(gem_tar, File.basename(gem_tar), target_string, inventory: inventory_hash) + install_build_tools(target_nodes, inventory_hash) + # Install dependent gems puts 'Installing yard gem...' install_remote_gem('yard', target_nodes, inventory_hash)