-
Notifications
You must be signed in to change notification settings - Fork 43
/
Rakefile
28 lines (22 loc) · 582 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
27
28
# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rubocop/rake_task'
require 'fileutils'
RuboCop::RakeTask.new(:rubocop)
Rake::TestTask.new(:test) do |t|
t.test_files = Dir['test/**/test_*.rb']
end
task default: 'docker:test'
task build: 'docker:test'
task default: :rubocop
namespace :docker do
distros = %i[ubuntu tdagent-ubuntu tdagent-almalinux]
task test: distros
distros.each do |distro|
task distro do
puts "testing on #{distro}"
sh "docker build . -f test/docker/Dockerfile.#{distro}"
end
end
end