2015-04-17 00:28:38 +00:00
|
|
|
require "bundler/gem_tasks"
|
2010-07-28 19:30:56 +00:00
|
|
|
|
2016-08-18 07:04:17 +00:00
|
|
|
task default: :spec
|
2019-04-12 00:28:00 +00:00
|
|
|
|
|
|
|
namespace :kokoro do
|
|
|
|
task :load_env_vars do
|
|
|
|
service_account = "#{ENV['KOKORO_GFILE_DIR']}/service-account.json"
|
|
|
|
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = service_account
|
|
|
|
filename = "#{ENV['KOKORO_GFILE_DIR']}/env_vars.json"
|
|
|
|
env_vars = JSON.parse File.read(filename)
|
|
|
|
env_vars.each { |k, v| ENV[k] = v }
|
|
|
|
end
|
|
|
|
|
|
|
|
task :presubmit do
|
|
|
|
Rake::Task["spec"].invoke
|
|
|
|
end
|
|
|
|
|
|
|
|
task :continuous do
|
|
|
|
Rake::Task["spec"].invoke
|
|
|
|
end
|
|
|
|
|
|
|
|
task :nightly do
|
|
|
|
Rake::Task["spec"].invoke
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def header str, token = "#"
|
|
|
|
line_length = str.length + 8
|
|
|
|
puts ""
|
|
|
|
puts token * line_length
|
|
|
|
puts "#{token * 3} #{str} #{token * 3}"
|
|
|
|
puts token * line_length
|
|
|
|
puts ""
|
|
|
|
end
|