forked from ajgon/opsworks_ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
26 lines (22 loc) · 854 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true
require 'bundler/setup'
desc 'Run Test Kitchen integration tests'
namespace :integration do
desc 'Run integration tests with kitchen-vagrant'
task :vagrant do
require 'kitchen'
Kitchen.logger = Kitchen.default_file_logger
Kitchen::Config.new.instances.each { |instance| instance.test(:always) }
end
desc 'Run integration tests with kitchen-docker'
task :docker, [:instance] do |_t, args|
args.with_defaults(instance: 'default-ubuntu-1804')
require 'kitchen'
Kitchen.logger = Kitchen.default_file_logger
loader = Kitchen::Loader::YAML.new(local_config: '.kitchen.docker.yml')
instances = Kitchen::Config.new(loader: loader).instances
# Travis CI Docker service does not support destroy:
instances.get(args.instance).verify
end
end
task default: %w[integration:vagrant]