forked from splunk/fluent-plugin-kubernetes-metrics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
29 lines (23 loc) · 701 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
29
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rake/testtask'
require 'rake/clean'
CLEAN.concat FileList[
'docker/*.gem',
'pkg'
]
Rake::TestTask.new(:test) do |t|
t.libs.push('lib', 'test')
t.test_files = FileList['test/**/test_*.rb']
t.verbose = true
t.warning = false
end
task default: [:test]
namespace :docker do
desc 'Build docker image'
task :build, [:tag] => :build do |_t, args|
raise 'Argument `tag` was not provided.' unless args.tag
cp Dir['pkg/fluent-plugin-kubernetes-metrics-*.gem'], 'docker/'
sh "docker build --no-cache --pull --build-arg VERSION=$(cat VERSION) --no-cache -t splunk/connect-for-kubernetes:#{args.tag} ./docker"
end
end